Skip to content

Commit

Permalink
Ignoring desktop windows and moving them on the bottom of the stack.
Browse files Browse the repository at this point in the history
This is important when i3 is used together with KDE Plasma Desktop.
  • Loading branch information
pronobis authored and Thaodan committed Oct 16, 2023
1 parent 26608b7 commit 39fd7e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/i3-atoms_NET_SUPPORTED.xmacro.h
Expand Up @@ -34,4 +34,5 @@ xmacro(_NET_DESKTOP_NAMES) \
xmacro(_NET_DESKTOP_VIEWPORT) \
xmacro(_NET_ACTIVE_WINDOW) \
xmacro(_NET_CLOSE_WINDOW) \
xmacro(_NET_MOVERESIZE_WINDOW)
xmacro(_NET_MOVERESIZE_WINDOW) \
xmacro(_NET_WM_WINDOW_TYPE_DESKTOP)
12 changes: 12 additions & 0 deletions src/manage.c
Expand Up @@ -245,6 +245,18 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
/* Where to start searching for a container that swallows the new one? */
Con *search_at = croot;

/* Ignore DESKTOP windows and move them to the bottom of the stack. */
if (xcb_reply_contains_atom(type_reply, A__NET_WM_WINDOW_TYPE_DESKTOP)) {
LOG("Ignoring window of type desktop\n");
xcb_map_window(conn, window);
uint32_t values[] = {XCB_STACK_MODE_BELOW};
xcb_configure_window(conn, window, XCB_CONFIG_WINDOW_STACK_MODE, values);

FREE(state_reply);
FREE(type_reply);
goto geom_out;
}

if (xcb_reply_contains_atom(type_reply, A__NET_WM_WINDOW_TYPE_DOCK)) {
LOG("This window is of type dock\n");
Output *output = get_output_containing(geom->x, geom->y);
Expand Down

0 comments on commit 39fd7e9

Please sign in to comment.