X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=ffe74a07078f39d60509571e1da995e5d4939ba7;hb=e27680e4205f5be210cd52660f495e67623e6260;hp=4d73eeac4de70a32eb1f57c0e6d39036ce83f725;hpb=5d5714f01e1a7140847f6e7f2922d457f6bbe66a;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 4d73eeac..ffe74a07 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -249,6 +249,7 @@ gboolean screen_annex(void) supported[i++] = OBT_PROP_ATOM(NET_WM_WINDOW_TYPE_DIALOG); supported[i++] = OBT_PROP_ATOM(NET_WM_WINDOW_TYPE_NORMAL); supported[i++] = OBT_PROP_ATOM(NET_WM_ALLOWED_ACTIONS); + supported[i++] = OBT_PROP_ATOM(NET_WM_WINDOW_OPACITY); supported[i++] = OBT_PROP_ATOM(NET_WM_ACTION_MOVE); supported[i++] = OBT_PROP_ATOM(NET_WM_ACTION_RESIZE); supported[i++] = OBT_PROP_ATOM(NET_WM_ACTION_MINIMIZE); @@ -479,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]; @@ -487,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; @@ -500,11 +496,13 @@ void screen_resize(void) if (ob_state() != OB_STATE_RUNNING) return; - screen_update_areas(); + /* this calls screen_update_areas(), which we need ! */ dock_configure(); - for (it = client_list; it; it = g_list_next(it)) + for (it = client_list; it; it = g_list_next(it)) { client_move_onscreen(it->data, FALSE); + client_reconfigure(it->data, FALSE); + } } void screen_set_num_desktops(guint num) @@ -1458,10 +1456,8 @@ void screen_update_areas(void) dims, 4 * screen_num_desktops); /* the area has changed, adjust all the windows if they need it */ - for (it = onscreen; it; it = g_list_next(it)) { - client_move_onscreen(it->data, FALSE); + for (it = onscreen; it; it = g_list_next(it)) client_reconfigure(it->data, FALSE); - } g_free(dims); } @@ -1653,7 +1649,7 @@ guint screen_find_monitor(const Rect *search) } } } - return most; + return most < screen_num_monitors ? most : screen_monitor_primary(FALSE); } const Rect* screen_physical_area_all_monitors(void) @@ -1754,3 +1750,12 @@ gboolean screen_pointer_pos(gint *x, gint *y) } return ret; } + +gboolean screen_compare_desktops(guint a, guint b) +{ + if (a == DESKTOP_ALL) + a = screen_desktop; + if (b == DESKTOP_ALL) + b = screen_desktop; + return a == b; +}