X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fmoveresize.c;h=ec9cb1037cd8c98dc2e33ca043be2c7ef0750624;hb=8116106f9d9d2834a51eb769c874425ab80a0d59;hp=5db79f9f3a32003c6c7b8b139aa33016cefc05b3;hpb=501943b53d68821a752ceda3fbd9b64bbcae4a4c;p=chaz%2Fopenbox diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 5db79f9f..ec9cb103 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -29,8 +29,8 @@ #include "config.h" #include "event.h" #include "debug.h" -#include "render/render.h" -#include "render/theme.h" +#include "obrender/render.h" +#include "obrender/theme.h" #include "obt/display.h" #include "obt/prop.h" #include "obt/keyboard.h" @@ -304,11 +304,7 @@ void moveresize_end(gboolean cancel) popup_hide(popup); - if (moving) { - client_move(moveresize_client, - (cancel ? start_cx : cur_x), - (cancel ? start_cy : cur_y)); - } else { + if (!moving) { #ifdef SYNC /* turn off the alarm */ if (moveresize_alarm != None) { @@ -318,15 +314,19 @@ void moveresize_end(gboolean cancel) obt_main_loop_timeout_remove(ob_main_loop, sync_timeout_func); #endif - - client_configure(moveresize_client, - (cancel ? start_cx : cur_x), - (cancel ? start_cy : cur_y), - (cancel ? start_cw : cur_w), - (cancel ? start_ch : cur_h), - TRUE, TRUE, FALSE); } + /* don't use client_move() here, use the same width/height as + we've been using during the move, otherwise we get different results + when moving maximized windows between monitors of different sizes ! + */ + client_configure(moveresize_client, + (cancel ? start_cx : cur_x), + (cancel ? start_cy : cur_y), + (cancel ? start_cw : cur_w), + (cancel ? start_ch : cur_h), + TRUE, TRUE, FALSE); + /* dont edge warp after its ended */ cancel_edge_warp();