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 2012-11-22 19:10:00 +0000

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.

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
0

answered 2012-12-31 02:13:26 +0000

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);
edit flag offensive delete link more

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 ( 2012-12-31 19:44:26 +0000 )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 ( 2013-01-01 04:16:20 +0000 )edit

this patch works very well for xfce4 desktop

killown gravatar imagekillown ( 2013-05-19 05:05:39 +0000 )edit
0

answered 2012-11-22 22:45:30 +0000

Michael gravatar image

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

edit flag offensive delete link more
0

answered 2013-04-06 17:21:43 +0000

sLite gravatar image

updated 2013-04-06 17:30:36 +0000

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)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-11-22 19:10:00 +0000

Seen: 965 times

Last updated: Apr 06 '13