X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fmoveresize.c;h=9374f8b5f77930e96eb37828540a2d9daf2181ee;hb=40996c42b3b3dae96338abac1a250a905d0fd8d9;hp=07b8e22b5d163837240ff41f51ca8d29a60f6743;hpb=17bc51aab8be25cd44c55eb0a652c92518bd9b0f;p=chaz%2Fopenbox diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 07b8e22b..9374f8b5 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -116,36 +116,42 @@ static void popup_coords(ObClient *c, const gchar *format, gint a, gint b) Rect *area = screen_physical_area_active(); gint gravity, x, y; - x = config_resize_popup_x; - if (config_resize_popup_x_center) x = area->x + area->width/2; - else if (config_resize_popup_x_opposite) x = RECT_RIGHT(*area) - x; - else x = area->x + x; - - y = config_resize_popup_y; - if (config_resize_popup_y_center) y = area->y + area->height/2; - else if (config_resize_popup_y_opposite) y = RECT_BOTTOM(*area) - y; - else y = area->y + y; - - if (config_resize_popup_x_center) { - if (config_resize_popup_y_center) + x = config_resize_popup_fixed.x.pos; + if (config_resize_popup_fixed.x.center) + x = area->x + area->width/2; + else if (config_resize_popup_fixed.x.opposite) + x = RECT_RIGHT(*area) - x; + else + x = area->x + x; + + y = config_resize_popup_fixed.y.pos; + if (config_resize_popup_fixed.y.center) + y = area->y + area->height/2; + else if (config_resize_popup_fixed.y.opposite) + y = RECT_RIGHT(*area) - y; + else + y = area->y + y; + + if (config_resize_popup_fixed.x.center) { + if (config_resize_popup_fixed.y.center) gravity = CenterGravity; - else if (config_resize_popup_y_opposite) + else if (config_resize_popup_fixed.y.opposite) gravity = SouthGravity; else gravity = NorthGravity; } - else if (config_resize_popup_x_opposite) { - if (config_resize_popup_y_center) + else if (config_resize_popup_fixed.x.opposite) { + if (config_resize_popup_fixed.y.center) gravity = EastGravity; - else if (config_resize_popup_y_opposite) + else if (config_resize_popup_fixed.y.opposite) gravity = SouthEastGravity; else gravity = NorthEastGravity; } else { - if (config_resize_popup_y_center) + if (config_resize_popup_fixed.y.center) gravity = WestGravity; - else if (config_resize_popup_y_opposite) + else if (config_resize_popup_fixed.y.opposite) gravity = SouthWestGravity; else gravity = NorthWestGravity; @@ -246,7 +252,8 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) #ifdef SYNC if (config_resize_redraw && !moving && extensions_sync && - moveresize_client->sync_request && moveresize_client->sync_counter) + moveresize_client->sync_request && moveresize_client->sync_counter && + !moveresize_client->not_responding) { /* Initialize values for the resize syncing, and create an alarm for the client's xsync counter */ @@ -361,7 +368,8 @@ static void do_resize(void) #ifdef SYNC if (config_resize_redraw && extensions_sync && - moveresize_client->sync_request && moveresize_client->sync_counter) + moveresize_client->sync_request && moveresize_client->sync_counter && + !moveresize_client->not_responding) { XEvent ce; XSyncValue val;