Bugfix: Render workspaces created by assignments to use correct
coordinates. Previously, i3 would send width=0, height=0 to windows which were put on workspaces created by an assignment (that is, invisible workspaces, which do not get rendered normally). from upstream git
This commit is contained in:
parent
0187f458ba
commit
a71122393e
@ -1,8 +1,9 @@
|
|||||||
# $OpenBSD: Makefile,v 1.46 2012/09/21 17:16:13 dcoppa Exp $
|
# $OpenBSD: Makefile,v 1.47 2012/09/25 15:06:35 dcoppa Exp $
|
||||||
|
|
||||||
COMMENT = improved dynamic tiling window manager
|
COMMENT = improved dynamic tiling window manager
|
||||||
|
|
||||||
DISTNAME = i3-4.3
|
DISTNAME = i3-4.3
|
||||||
|
REVISION = 0
|
||||||
CATEGORIES = x11
|
CATEGORIES = x11
|
||||||
|
|
||||||
EXTRACT_SUFX = .tar.bz2
|
EXTRACT_SUFX = .tar.bz2
|
||||||
|
36
x11/i3/patches/patch-src_manage_c
Normal file
36
x11/i3/patches/patch-src_manage_c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
$OpenBSD: patch-src_manage_c,v 1.7 2012/09/25 15:06:35 dcoppa Exp $
|
||||||
|
|
||||||
|
From 372d47842e7d71fde0a194761bf77dceed6e724c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Stapelberg <michael@stapelberg.de>
|
||||||
|
Date: Mon, 24 Sep 2012 21:57:58 +0000
|
||||||
|
Subject: Bugfix: Render workspaces created by assignments to use correct coordinates
|
||||||
|
|
||||||
|
Previously, i3 would send width=0, height=0 to windows which were
|
||||||
|
put on workspaces created by an assignment (that is, invisible
|
||||||
|
workspaces, which do not get rendered normally).
|
||||||
|
|
||||||
|
--- src/manage.c.orig Wed Sep 19 18:08:09 2012
|
||||||
|
+++ src/manage.c Tue Sep 25 16:58:40 2012
|
||||||
|
@@ -381,6 +381,22 @@ void manage_window(xcb_window_t window, xcb_get_window
|
||||||
|
/* Check if any assignments match */
|
||||||
|
run_assignments(cwindow);
|
||||||
|
|
||||||
|
+ /* If this window was put onto an invisible workspace (via assignments), we
|
||||||
|
+ * render this workspace. It wouldn't be rendered in our normal code path
|
||||||
|
+ * because only the visible workspaces get rendered.
|
||||||
|
+ *
|
||||||
|
+ * By rendering the workspace, we assign proper coordinates (read: not
|
||||||
|
+ * width=0, height=0) to the window, which is important for windows who
|
||||||
|
+ * actually use them to position their GUI elements, e.g. rhythmbox. */
|
||||||
|
+ if (ws && !workspace_is_visible(ws)) {
|
||||||
|
+ /* This is a bit hackish: we need to copy the content container's rect
|
||||||
|
+ * to the workspace, because calling render_con() on the content
|
||||||
|
+ * container would also take the shortcut and not render the invisible
|
||||||
|
+ * workspace at all. However, just calling render_con() on the
|
||||||
|
+ * workspace isn't enough either - it needs the rect. */
|
||||||
|
+ ws->rect = ws->parent->rect;
|
||||||
|
+ render_con(ws, true);
|
||||||
|
+ }
|
||||||
|
tree_render();
|
||||||
|
|
||||||
|
geom_out:
|
Loading…
Reference in New Issue
Block a user