From 9c73915ca781a8058647097085668fe299e32c95 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 7 Dec 2023 22:51:13 +0900 Subject: twin: use separate bit to inhibit configure request messages. This resolves issue #434. Signed-off-by: Michele Calgaro (cherry picked from commit f5bdd235fc583f6674581df993165b9e7ae8774c) --- twin/client.cpp | 3 ++- twin/client.h | 1 + twin/events.cpp | 2 +- twin/geometry.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/twin/client.cpp b/twin/client.cpp index d76dda619..75aa896d4 100644 --- a/twin/client.cpp +++ b/twin/client.cpp @@ -99,6 +99,7 @@ Client::Client( Workspace *ws ) decoration( NULL ), wspace( ws ), bridge( new Bridge( this )), + inhibitConfigureRequests(false), move_faked_activity( false ), move_resize_grab_window( None ), transient_for( NULL ), @@ -974,7 +975,7 @@ void Client::setShade( ShadeMode mode ) void Client::configureRequestTimeout() { - moveResizeMode = false; + inhibitConfigureRequests = false; sendSyntheticConfigureNotify(); } diff --git a/twin/client.h b/twin/client.h index 00703608d..944b837f6 100644 --- a/twin/client.h +++ b/twin/client.h @@ -481,6 +481,7 @@ class Client : public TQObject, public KDecorationDefines int desk; bool buttonDown; bool moveResizeMode; + bool inhibitConfigureRequests; bool move_faked_activity; Window move_resize_grab_window; bool unrestrictedMoveResize; diff --git a/twin/events.cpp b/twin/events.cpp index 10c06f93d..166767239 100644 --- a/twin/events.cpp +++ b/twin/events.cpp @@ -785,7 +785,7 @@ void Client::configureRequestEvent( XConfigureRequestEvent* e ) { if( e->window != window()) return; // ignore frame/wrapper - if ( isResize() || isMove()) + if ( isResize() || isMove() || inhibitConfigureRequests) { // Send a synthetic configure notification to make sure the // window contents get updated by the application diff --git a/twin/geometry.cpp b/twin/geometry.cpp index 65285cab6..f729c702c 100644 --- a/twin/geometry.cpp +++ b/twin/geometry.cpp @@ -1451,7 +1451,7 @@ const TQPoint Client::calculateGravitation( bool invert, int gravity ) const void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool ) { - moveResizeMode = true; + inhibitConfigureRequests = true; configureRequestTimer->start(100, true); if( gravity == 0 ) // default (nonsense) value for the argument gravity = xSizeHint.win_gravity; -- cgit v1.2.1