diff options
| author | Po Lu | 2022-03-09 20:43:59 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-09 20:43:59 +0800 |
| commit | b883e8bc65d314273b63da873e1cdbbac23978e9 (patch) | |
| tree | 25e31c922ee7705c8cd1531cf544aeafb3c15536 | |
| parent | 06d826d0cac4f82e9bf6ce2c1e38ddbc882a5220 (diff) | |
| download | emacs-b883e8bc65d314273b63da873e1cdbbac23978e9.tar.gz emacs-b883e8bc65d314273b63da873e1cdbbac23978e9.zip | |
Fix GTK widgets not appearing inside child frames
* src/xfns.c (x_set_parent_frame): Disable GTK's own frame
synchronization in child frames.
| -rw-r--r-- | src/xfns.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c index c71f2b025f4..cf5823c645b 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -919,6 +919,9 @@ static void | |||
| 919 | x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) | 919 | x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) |
| 920 | { | 920 | { |
| 921 | struct frame *p = NULL; | 921 | struct frame *p = NULL; |
| 922 | #ifdef HAVE_GTK3 | ||
| 923 | GdkWindow *window; | ||
| 924 | #endif | ||
| 922 | 925 | ||
| 923 | if (!NILP (new_value) | 926 | if (!NILP (new_value) |
| 924 | && (!FRAMEP (new_value) | 927 | && (!FRAMEP (new_value) |
| @@ -942,6 +945,14 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu | |||
| 942 | (GTK_CONTAINER (FRAME_GTK_OUTER_WIDGET (f)), | 945 | (GTK_CONTAINER (FRAME_GTK_OUTER_WIDGET (f)), |
| 943 | p ? GTK_RESIZE_IMMEDIATE : GTK_RESIZE_QUEUE); | 946 | p ? GTK_RESIZE_IMMEDIATE : GTK_RESIZE_QUEUE); |
| 944 | #endif | 947 | #endif |
| 948 | |||
| 949 | #ifdef HAVE_GTK3 | ||
| 950 | if (p) | ||
| 951 | { | ||
| 952 | window = gtk_widget_get_window (FRAME_GTK_OUTER_WIDGET (f)); | ||
| 953 | gdk_x11_window_set_frame_sync_enabled (window, false); | ||
| 954 | } | ||
| 955 | #endif | ||
| 945 | unblock_input (); | 956 | unblock_input (); |
| 946 | 957 | ||
| 947 | fset_parent_frame (f, new_value); | 958 | fset_parent_frame (f, new_value); |