KWin编译

本文详述了如何从源码编译KWin窗口管理器,涉及版本选择、依赖安装、编译过程及错误处理,适用于KDE、Deepin、UOS和UKUI等系统。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

0 前言

    KDE(KUbuntu)、DDE(Deepin、UOS)、UKUI(银河麒麟、开放麒麟)默认都采用KWin窗口管理器,虽然可通过下面命令安装,本文重点介绍如何从源码安装。

Tips:若不想编译源码,可通过下面命令安装:

# Deepin
sudo apt-get install -y dde-kwin dde-kwin-dev # Tips:参考资料[2]提供了“dde-kwin-xxx.deb”!

# Ubuntu
sudo apt-get install -y kwin # UbuntuKylin20.04验证OK

1 源码

1.1 版本

(1)系统

    可通过“kwin --version”命令查看版本,不同发行版默认所用KWin版本如下:

发行版 KWin 说明
KUbuntu 20.04 5.18.7
22.04 5.24.7
Deepin 20.9 5.15.11.65-1
23 5.24.3
UOS Pro V20 5.15.11.59-1 没找到该版本源码,找到验证可用的是5.15.11.51
银河麒麟 V10 ukui-kwin 1.0.0

(2)源码

    直接查看CMakeLists.txt。

1.2 下载

(1)方法1

# DDE
git clone https://github.com/linuxdeepin/dde-kwin.git 	 # deepin-wm-dbus、kwinrc、kwin_no_scale
git clone https://github.com/linuxdeepin/deepin-kwin.git # kwin_x11

# KDE
git clone https://invent.kde.org/plasma/kwin.git

# UKUI
git clone https://github.com/ukui/ukui-kwin.git

# openKylin
git clone https://gitee.com/openkylin/kwin.git

(2)方法2

apt source kwin

2 依赖

(1)方法1

# UOS/Deepin
sudo apt build-dep kwin # [22]

# 银河麒麟
sudo apt build-dep ukui-kwin-wayland # [21]

:Kubuntu使用上述方法会报错“E: You must put some 'deb-src' URIs in your sources.lis”,需要将/etc/apt/sources.list中“deb-sr

https://store.kde.org/content/show.php/Tiling?content=161151 Description: Note that this requires kde 4.11 for the config interface at least Tiling script for kwin, featuring: - A useractionmenu to selectively tile windows - Three layouts, all mouse-resizable - One layout with the option to set multiple "master" windows ("M-S-+" to increment, "M-S--" to decrement) - The option to deactivate tiling per-desktop via keybinding - A configuration menu for floating windows (by class) - An option to remove windowborders - "Animated" resizing and moving - Optional "useless" gaps Hotkeys: ("M" here stands for what is usually the windows key, "S" stands for shift) M-PgUp / M-PgDown: Switch layout for current desktop M-S-F11: Deactivate tiling on current desktop M-f: Toggle between tiling and floating for active window M-S-m: Swap active window with the master window M-S-+: Increment number of master windows in (default) "HalfLayout" M-S-h, M-S-j, M-S-k, M-S-l: Move window in corresponding direction The following have been removed in 1.6.2 as they are already provided by kwin (but set to different keys): M-u: Toggle window borders M-h, M-j, M-k, M-l: Switch focus in corresponding direction If you would like to help, consider reporting bugs and maybe even sending pullrequests to www.github.com/faho/kwin-tiling Changelog: 2 years ago * Forgot to enable bladelayout, could lead to crashes/script not working. * 1.0.1: Fix some issues with panel at the top * 1.1.0: Add an option to disable borders This should only be used with FocusUnderMouse, as because of a kwin limitation focus can jump and it's impossible to tell which window has focus * 1.1.1: Bugfixes and an attempt to adjust to new or removed panels * 1.1.2: Enable resize "animations" and bugfixes (again including panel struts) * 1.1.3: Retile on layout switch and keep desktop floating state * 1.1.4: Bugfixes related to tabgroups and the focus hotkeys * 1.2: Properly retile when a client resizes (including borders), "animate" moving, improve resizing "animation", add keybinding to toggle window border and bugfixes * 1.2.1: Remove broken tabgroup handling (tabgroups float for now) and add a possible bugfix for some transparency issues * 1.3 (unreleased): Readd clients that return (e.g. are unminimized) to their previous tile, bugfixes (including resizing) * 1.3.1: Tabgroups, add shortcut (Meta+Shift+M) to swap a window with the master, bugfixes * 1.3.1.1: Fix plasmoids immediately closing * 1.3.1.2: Fix maximizing, fullscreen and resizing bugs * 1.3.2: Fix windows not responding and focus-follows-mouse choosing the wrong window, add an option to open windows as master * 1.3.3: Fix movement losing windows, add workaround for steam update window, fix tiling not working * 1.4: Add option to disable tiling by default, add per-desktop layout configuration (as a line of text currently), add shortcut to toggle borders on all clients (M-S-U), add shortcuts to resize the master window (M-Alt-{h,j,k,l}), minor bug fixes * 1.5: Bugfixes (including crashes), optional gaps between windows, respect min/maxsize (unfortunately this could cause crashes under certain circumstances) * 1.6 (unreleased): Make resizing layout-agnostic, a manual tiling mode, code cleanup, fix tiling when compositing is disabled * 1.6.1: Respect min/maxSizes, multiple (or zero) master support in halflayout, bugfixes * 1.6.2: Make respecting min/MaxSizes an option, improve fullscreen behavior, improve configuration UI, remove shortcuts for toggling a border for a single window and switching focus (as they are provided by kwin itself already) * 1.6.3: Fix crash when number of desktops isn't height * width of desktopgrid, fix default floating list * 1.7.0: Bugfixes, add option to defer placement to kwin
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

OneSea

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值