X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmoveresize.c;h=c55b88e1504249f660afa2581d79e4b3dd15b747;hb=a16f1374eed70bc30a85f35f56c05d3073c6f0e0;hp=837f3e92feec451dd59993944d42fa9f785fc36e;hpb=66db9aef3476e68cd062af86768f485a2fba829f;p=chaz%2Fopenbox diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 837f3e92..c55b88e1 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -325,31 +325,32 @@ static void do_move(gboolean keyboard) static void do_resize() { + gint x, y, w, h, lw, lh; + + /* see if it is actually going to resize */ + x = 0; + y = 0; + w = cur_x; + h = cur_y; + client_try_configure(moveresize_client, &x, &y, &w, &h, + &lw, &lh, TRUE); + if (w == moveresize_client->area.width && + h == moveresize_client->area.height) + { + return; + } + #ifdef SYNC if (config_resize_redraw && extensions_sync && moveresize_client->sync_request && moveresize_client->sync_counter) { XEvent ce; XSyncValue val; - gint x, y, w, h, lw, lh; /* are we already waiting for the sync counter to catch up? */ if (waiting_for_sync) return; - /* see if it is actually going to resize */ - x = 0; - y = 0; - w = cur_x; - h = cur_y; - client_try_configure(moveresize_client, &x, &y, &w, &h, - &lw, &lh, TRUE); - if (w == moveresize_client->area.width && - h == moveresize_client->area.height) - { - return; - } - /* increment the value we're waiting for */ ++moveresize_client->sync_counter_value; XSyncIntToValue(&val, moveresize_client->sync_counter_value); @@ -372,11 +373,8 @@ static void do_resize() } #endif - { - gint x, y; - get_resize_position(&x, &y, FALSE); - client_configure(moveresize_client, x, y, cur_x, cur_y, TRUE, FALSE); - } + get_resize_position(&x, &y, FALSE); + client_configure(moveresize_client, x, y, cur_x, cur_y, TRUE, FALSE); /* this would be better with a fixed width font ... XXX can do it better if there are 2 text boxes */