summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-01-15 17:49:54 -0500
committerDana Jansens <danakj@orodu.net>2010-01-15 17:49:54 -0500
commit7be28d3010d4bf68954a113ab8350ac2ddb768aa (patch)
tree5f5626ff5ab0cc9f7cbc7d7a36f99fc533934cbe
parent16433ce06c083de8c725b8dc906f47c1333e3b33 (diff)
don't use client_move() to end a move
client_move() uses the client's current width/height, whereas all along we were using the width/height the client had at the start, so this causes client_configure() to behave differently at the end than during the move
-rw-r--r--openbox/moveresize.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/openbox/moveresize.c b/openbox/moveresize.c
index 99222577..ec9cb103 100644
--- a/openbox/moveresize.c
+++ b/openbox/moveresize.c
@@ -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();