summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-06-23 05:11:39 +0000
committerDana Jansens <danakj@orodu.net>2007-06-23 05:11:39 +0000
commitc62fefb0677aaf4dd5f13fc91a0261711507fab8 (patch)
treea0055b2542674e251b288e62f0115d3e45ecee0b
parent8ab1e9537e5aebfe48d826cbf266cf8d582d9d65 (diff)
always reconfigure the window to its new position even if it was fullscreened/maxed, because the pre-max/fs area may not match its actual current area, and this can lead it things not being updated
-rw-r--r--openbox/client.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c
index e3a602d5..82024945 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -2613,11 +2613,18 @@ static void client_apply_startup_state(ObClient *self,
else if (max_horz)
client_maximize(self, TRUE, 1);
- /* if the window hasn't been configured yet, then do so now */
- if (!fullscreen && !max_vert && !max_horz) {
- self->area = oldarea;
- client_configure(self, x, y, w, h, FALSE, TRUE, FALSE);
- }
+ /* if the window hasn't been configured yet, then do so now, in fact the
+ x,y,w,h may _not_ be the same as the area rect, which can end up
+ meaning that the client isn't properly moved/resized by the fullscreen
+ function
+ pho can cause this because it maps at size of the screen but not 0,0
+ so openbox moves it on screen to 0,0 (thus x,y=0,0 and area.x,y don't).
+ then fullscreen'ing makes it go to 0,0 which it thinks it already is at
+ cuz thats where the pre-fullscreen will be. however the actual area is
+ not, so this needs to be called even if we have fullscreened/maxed
+ */
+ self->area = oldarea;
+ client_configure(self, x, y, w, h, FALSE, TRUE, FALSE);
/* set the desktop hint, to make sure that it always exists */
PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop);
@@ -2884,6 +2891,9 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
oldw = self->area.width;
oldh = self->area.height;
RECT_SET(self->area, x, y, w, h);
+ ob_debug("Client area %s set to %d %d %d %d\n",
+ self->title, self->area.x, self->area.y,
+ self->area.width, self->area.height);
/* for app-requested resizes, always resize if 'resized' is true.
for user-requested ones, only resize if final is true, or when
@@ -3029,6 +3039,9 @@ void client_fullscreen(ObClient *self, gboolean fs)
RECT_SET(self->pre_fullscreen_area, 0, 0, 0, 0);
}
+ ob_debug("Window %s going fullscreen (%d)\n",
+ self->title, self->fullscreen);
+
client_setup_decor_and_functions(self, FALSE);
client_move_resize(self, x, y, w, h);