aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Gutov2026-03-16 23:55:05 +0200
committerDmitry Gutov2026-03-16 23:55:24 +0200
commitf8696367bcf9cdb91f3dcf1d6b8707b29d2b208a (patch)
tree59a50ffcd21ba7827fcd2801f907386c21fa4007 /src
parent41474108529c6964ce1ad2da11ee36475a55634e (diff)
downloademacs-f8696367bcf9cdb91f3dcf1d6b8707b29d2b208a.tar.gz
emacs-f8696367bcf9cdb91f3dcf1d6b8707b29d2b208a.zip
Assign bit gravity to window in Lucid and Motif ports too
* src/widget.c (EmacsFrameRealize): Assign bit_gravity, and use the value of NorthWestGravity which matches the GTK3 behavior, and the general intuition that window's contents should move with its top-left corner. The result is that the frame is not blinking during resizing (bug#80369). * src/xfns.c (x_window) [!USE_X_TOOLKIT]: Change bit_gravity from StaticGravity to NorthWestGravity as well, to match the others.
Diffstat (limited to 'src')
-rw-r--r--src/widget.c2
-rw-r--r--src/xfns.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/widget.c b/src/widget.c
index 43c8fa7185f..e767b006e3f 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -392,7 +392,9 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
392 attrs->event_mask = (STANDARD_EVENT_SET 392 attrs->event_mask = (STANDARD_EVENT_SET
393 | PropertyChangeMask 393 | PropertyChangeMask
394 | SubstructureNotifyMask); 394 | SubstructureNotifyMask);
395 attrs->bit_gravity = NorthWestGravity;
395 *mask |= CWEventMask; 396 *mask |= CWEventMask;
397 *mask |= CWBitGravity;
396 XtCreateWindow (widget, InputOutput, (Visual *) CopyFromParent, *mask, 398 XtCreateWindow (widget, InputOutput, (Visual *) CopyFromParent, *mask,
397 attrs); 399 attrs);
398 /* Some ConfigureNotify events does not end up in EmacsFrameResize so 400 /* Some ConfigureNotify events does not end up in EmacsFrameResize so
diff --git a/src/xfns.c b/src/xfns.c
index 87ce3af30d7..33ec8312cb5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4483,7 +4483,7 @@ x_window (struct frame *f)
4483 4483
4484 attributes.background_pixel = FRAME_BACKGROUND_PIXEL (f); 4484 attributes.background_pixel = FRAME_BACKGROUND_PIXEL (f);
4485 attributes.border_pixel = f->output_data.x->border_pixel; 4485 attributes.border_pixel = f->output_data.x->border_pixel;
4486 attributes.bit_gravity = StaticGravity; 4486 attributes.bit_gravity = NorthWestGravity;
4487 attributes.backing_store = NotUseful; 4487 attributes.backing_store = NotUseful;
4488 attributes.save_under = True; 4488 attributes.save_under = True;
4489 attributes.event_mask = STANDARD_EVENT_SET; 4489 attributes.event_mask = STANDARD_EVENT_SET;