The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Window as desktop

asked Nov 22 '12

XKero gravatar image

Does i3 support any way for a window to be managed as if it was the desktop? Plasma-desktop (from KDE) is an example of an application that creates it's own window for the desktop. Trying to start such programs results in i3 trying to tile them like normal windows.

3 answers

Sort by » oldest newest most voted
0

answered Dec 31 '12

Marius gravatar image

The following patch makes desktop windows to be mapped but not managed by i3, resulting in the behaviour you are looking for.

diff --git a/include/atoms.xmacro b/include/atoms.xmacro

index 7cfef82..5d2d2db 100644
--- a/include/atoms.xmacro
+++ b/include/atoms.xmacro
@@ -14,6 +14,7 @@ xmacro(_NET_WM_STRUT_PARTIAL)
 xmacro(_NET_CLIENT_LIST_STACKING)
 xmacro(_NET_CURRENT_DESKTOP)
 xmacro(_NET_ACTIVE_WINDOW)
+xmacro(_NET_WM_WINDOW_TYPE_DESKTOP)
 xmacro(_NET_WORKAREA)
 xmacro(_NET_STARTUP_ID)
 xmacro(_NET_WM_ICON)
diff --git a/src/manage.c b/src/manage.c
index b3c43d5..990ffc8 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -214,6 +214,18 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
     Con *search_at = croot;

     xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, wm_type_cookie, NULL);
+
+    /* Don't manage desktop type windows, just map them */
+    if (xcb_reply_contains_atom(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);
+
+        goto geom_out;
+    }
+
     if (xcb_reply_contains_atom(reply, A__NET_WM_WINDOW_TYPE_DOCK)) {
         LOG("This window is of type dock\n");
         Output *output = get_output_containing(geom->x, geom->y);

Comments

Note that I believe this patch is incorrect and (aside from that) should not be merged: https://github.com/i3/i3/issues/903

Michael gravatar imageMichael (Dec 31 '12)edit

Yes, the patch doesn't take into account any of the issues Michael mentions in ticket 903. It seems to work fine for me in case of plasma-desktop (I haven't tested it in other environments).

Marius gravatar imageMarius (Jan 1 '13)edit

this patch works very well for xfce4 desktop

killown gravatar imagekillown (May 19 '13)edit
0

answered Nov 22 '12

Michael gravatar image

No, it doesn’t. See also http://faq.i3wm.org/question/1/how-ca...

0

answered Apr 6 '13

sLite gravatar image

updated Apr 6 '13

you can try with --force-xinerama, i dont know why but i found out by accident that this solves that problem.

this has some other side effects as noted out in the docs but had the desired effect for me.

(also confirmed on an ati card, althouth the article talks specifically about nvidia)

Question Tools

1 follower

Stats

Asked: Nov 22 '12

Seen: 965 times

Last updated: Apr 06 '13