aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuuki Harano2021-11-16 01:19:12 +0900
committerYuuki Harano2021-11-16 01:19:12 +0900
commit20dd24c3a058d85f5e92311038fe4f561f00bf8f (patch)
tree802261237d113ce6452a3645b078a9f2314ac52f /src
parent37738c32aca5b6cf0811e957ced7e1d7385ef620 (diff)
downloademacs-20dd24c3a058d85f5e92311038fe4f561f00bf8f.tar.gz
emacs-20dd24c3a058d85f5e92311038fe4f561f00bf8f.zip
Avoid handle terminal frames in pgtk_mouse_position.
Just above, f1 can become a selected frame, which may be a terminal frame. We can't call gtk_widget_get_window() for a terminal frame. * src/pgtkterm.c (pgtk_mouse_position): Return if it is not a pgtk frame.
Diffstat (limited to 'src')
-rw-r--r--src/pgtkterm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 0d258584c53..5d39276a884 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -3350,6 +3350,13 @@ pgtk_mouse_position (struct frame **fp, int insist, Lisp_Object * bar_window,
3350 } 3350 }
3351 } 3351 }
3352 3352
3353 /* f1 can be a terminal frame. */
3354 if (f1 == NULL || !FRAME_PGTK_P (f1))
3355 {
3356 unblock_input ();
3357 return;
3358 }
3359
3353 /* 2. get the display and the device. */ 3360 /* 2. get the display and the device. */
3354 win = gtk_widget_get_window (FRAME_GTK_WIDGET (f1)); 3361 win = gtk_widget_get_window (FRAME_GTK_WIDGET (f1));
3355 GdkDisplay *gdpy = gdk_window_get_display (win); 3362 GdkDisplay *gdpy = gdk_window_get_display (win);