]> Dogcows Code - chaz/openbox/blobdiff - openbox/moveresize.c
don't use client_move() to end a move
[chaz/openbox] / openbox / moveresize.c
index 99222577c4e9c1127e026e91360415fedd319f3e..ec9cb1037cd8c98dc2e33ca043be2c7ef0750624 100644 (file)
@@ -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();
 
This page took 0.023564 seconds and 4 git commands to generate.