From 3882bac2fbc9f7b839f93e2c4aa7e5cca9c9167a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 15 Oct 2011 21:04:21 -0400 Subject: [PATCH] Hear screen resizes when they don't change the root window (cloning) --- openbox/screen.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/openbox/screen.c b/openbox/screen.c index f7d39fb5..e15f6152 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -480,7 +480,6 @@ void screen_shutdown(gboolean reconfig) void screen_resize(void) { - static gint oldw = 0, oldh = 0; gint w, h; GList *it; gulong geometry[2]; @@ -488,10 +487,6 @@ void screen_resize(void) w = WidthOfScreen(ScreenOfDisplay(obt_display, ob_screen)); h = HeightOfScreen(ScreenOfDisplay(obt_display, ob_screen)); - if (w == oldw && h == oldh) return; - - oldw = w; oldh = h; - /* Set the _NET_DESKTOP_GEOMETRY hint */ screen_physical_size.width = geometry[0] = w; screen_physical_size.height = geometry[1] = h; @@ -504,9 +499,8 @@ void screen_resize(void) /* this calls screen_update_areas(), which we need ! */ dock_configure(); - if (oldw) - for (it = client_list; it; it = g_list_next(it)) - client_move_onscreen(it->data, FALSE); + for (it = client_list; it; it = g_list_next(it)) + client_move_onscreen(it->data, FALSE); } void screen_set_num_desktops(guint num) @@ -1339,8 +1333,8 @@ static void get_xinerama_screens(Rect **xin_areas, guint *nxin) gint h = HeightOfScreen(ScreenOfDisplay(obt_display, ob_screen)); *nxin = 2; *xin_areas = g_new(Rect, *nxin + 1); - RECT_SET((*xin_areas)[0], 0, 0, w/2, h); - RECT_SET((*xin_areas)[1], w/2, 0, w-(w/2), h); + RECT_SET((*xin_areas)[0], 0, h/2, w/2, h/2); + RECT_SET((*xin_areas)[1], 0, 0, w, h/2-100); } #ifdef XINERAMA else if (obt_display_extension_xinerama && -- 2.34.1