[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk 20dd24c: Avoid handle terminal frames in pgtk_mouse_positio
From: |
Yuuki Harano |
Subject: |
feature/pgtk 20dd24c: Avoid handle terminal frames in pgtk_mouse_position. |
Date: |
Mon, 15 Nov 2021 11:22:21 -0500 (EST) |
branch: feature/pgtk
commit 20dd24c3a058d85f5e92311038fe4f561f00bf8f
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Yuuki Harano <masm+github@masm11.me>
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.
---
src/pgtkterm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 0d25858..5d39276 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,
}
}
+ /* f1 can be a terminal frame. */
+ if (f1 == NULL || !FRAME_PGTK_P (f1))
+ {
+ unblock_input ();
+ return;
+ }
+
/* 2. get the display and the device. */
win = gtk_widget_get_window (FRAME_GTK_WIDGET (f1));
GdkDisplay *gdpy = gdk_window_get_display (win);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/pgtk 20dd24c: Avoid handle terminal frames in pgtk_mouse_position.,
Yuuki Harano <=