# kwin **Repository Path**: foundos_1/kwin ## Basic Information - **Project Name**: kwin - **Description**: 窗口管理器,负责管理窗口和工作区的显示和交互 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 2 - **Created**: 2024-07-23 - **Last Updated**: 2025-10-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # KWin KWin is an easy to use, but flexible, composited Window Manager for Xorg windowing systems (Wayland, X11) on Linux. Its primary usage is in conjunction with a Desktop Shell (e.g. KDE Plasma Desktop). KWin is designed to go out of the way; users should not notice that they use a window manager at all. Nevertheless KWin provides a steep learning curve for advanced features, which are available, if they do not conflict with the primary mission. KWin does not have a dedicated targeted user group, but follows the targeted user group of the Desktop Shell using KWin as it's window manager. ## KWin is not... * a standalone window manager (c.f. openbox, i3) and does not provide any functionality belonging to a Desktop Shell. * a replacement for window managers designed for use with a specific Desktop Shell (e.g. GNOME Shell) * a minimalistic window manager * designed for use without compositing or for X11 network transparency, though both are possible. # Contributing to KWin Please refer to the [contributing document](CONTRIBUTING.md) for everything you need to know to get started contributing to KWin. # Contacting KWin development team * mailing list: [kwin@kde.org](https://mail.kde.org/mailman/listinfo/kwin) * IRC: #kde-kwin on irc.libera.chat # Support ## Application Developer If you are an application developer having questions regarding windowing systems (either X11 or Wayland) please do not hesitate to contact us. Preferable through our mailing list. Ideally subscribe to the mailing list, so that your mail doesn't get stuck in the moderation queue. ## End user Please contact the support channels of your Linux distribution for user support. The KWin development team does not provide end user support. # Reporting bugs Please use [KDE's bugtracker](https://bugs.kde.org) and report for [product KWin](https://bugs.kde.org/enter_bug.cgi?product=kwin). ## Guidelines for new features A new Feature can only be added to KWin if: * it does not violate the primary missions as stated at the start of this document * it does not introduce instabilities * it is maintained, that is bugs are fixed in a timely manner (second next minor release) if it is not a corner case. * it works together with all existing features * it supports both single and multi screen (xrandr) * it adds a significant advantage * it is feature complete, that is supports at least all useful features from competitive implementations * it is not a special case for a small user group * it does not increase code complexity significantly * it does not affect KWin's license (GPLv2+) All new added features are under probation, that is if any of the non-functional requirements as listed above do not hold true in the next two feature releases, the added feature will be removed again. The same non functional requirements hold true for any kind of plugins (effects, scripts, etc.). It is suggested to use scripted plugins and distribute them separately. ## 按应用禁用窗口装饰(X11/Wayland) 某些应用(例如 ToDesk、部分远控或视频会议工具)会自绘边框或以无边框窗口运行。当 KWin 也为其添加服务端装饰时,可能出现异常边框或双层边框。为此,KWin 支持基于应用匹配的“禁止添加装饰”配置: - 配置文件:`~/.config/kwinrc` - 配置段:`[NoDecorateApps]` - 键值: - `classes`:按 WM_CLASS(resourceClass/resourceName)匹配,支持通配符 `*`、`?`,大小写不敏感。 - `names`:按窗口标题匹配,支持通配符 `*`、`?`,大小写不敏感。 - 分隔符:逗号 `,`、分号 `;`、空白(空格/制表符)或换行,均可分隔多个条目。 - 环境变量临时覆盖:`KWIN_NODECORATE_APPS="app1;app2;myapp-*"` 行为说明: - 仅当窗口已声明“无边框”或使用客户端装饰时,此规则才生效(避免影响常规需要服务端装饰的窗口)。 - 匹配字段:X11 使用 `resourceClass` 与 `resourceName`,Wayland/XWayland 对应应用标识和标题。任一字段命中即跳过装饰。 - 默认内置条目:`todesk` 已包含于匹配列表,无需额外添加。 快速示例: 参考示例片段位于项目根目录的 `kwinrc-nodecorate.conf`,首次启动会自动复制到 `~/.config/kwinrc`。如需手动合并,可复制其中的 `[NoDecorateApps]` 段落。 应用配置: - **自动配置**:首次启动时,KWin 会检查 `~/.config/kwinrc` 是否包含 `[NoDecorateApps]` 段。如不存在,将自动从项目根目录的 `/etc/kwin/nodecorate.conf` 复制默认配置。 - Wayland 会话常见做法:重启 KWin 或重新登录会话;X11 会话可用 `kwin_x11 --replace` 进行平滑替换(请注意风险)。 - 也可临时导出环境变量后重启 KWin 进程进行验证。 排障提示: - 使用 `xprop WM_CLASS`(X11)或 `kwin_debugconsole` 查看窗口类名,以便写入更精确的 `classes` 规则。 - 若误伤普通窗口,先移除相应规则或仅在 `names` 加上更具体的标题通配。