summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-12-03 20:36:22 +0100
committerMatthias Melcher <github@matthiasm.com>2024-12-03 20:37:28 +0100
commit8df4f8e398cffe69b2fa5fe2b608cfba72de9308 (patch)
tree372fddfce97c18ee79dcae99a99b5bc85b11a331 /fluid
parent167dba881733d8a8f43cfe047e1122512e5f878e (diff)
FLUID: avoid generating undo un spurious relayout events, #1152
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Window_Type.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index e539d671a..a911905b6 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -413,7 +413,13 @@ Fl_Window_Type Fl_Window_type;
// Resize from window manager...
void Overlay_Window::resize(int X,int Y,int W,int H) {
- undo_checkpoint_once(kUndoWindowResize);
+ // Make sure we don't create undo checkpoints if the window does not actually change.
+ // Some WMs seem to send spurious resize events.
+ if (X!=x() || Y!=y() || W!=w() || H!=h()) {
+ // Set a checkpoint on the first resize event, ignore further resizes until
+ // a different type of checkpoint is triggered.
+ undo_checkpoint_once(kUndoWindowResize);
+ }
Fl_Widget* t = resizable();
if (Fl_Type::allow_layout == 0) {