summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXKeyEvent.c
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2021-02-28 03:56:53 (GMT)
committermarc_culler <marc.culler@gmail.com>2021-02-28 03:56:53 (GMT)
commit736df9dee2e65f85c1784b24088753ea4b3371de (patch)
tree225c5389bd0e4ba419f7eaec1564bd99a7800445 /macosx/tkMacOSXKeyEvent.c
parent479768a11065e667d481fe730c36216e1e0ee3ec (diff)
parent0b626e656a1ba14a266ebabb57bb403195dd9e9e (diff)
downloadtk-736df9dee2e65f85c1784b24088753ea4b3371de.zip
tk-736df9dee2e65f85c1784b24088753ea4b3371de.tar.gz
tk-736df9dee2e65f85c1784b24088753ea4b3371de.tar.bz2
Merge 8.6
Diffstat (limited to 'macosx/tkMacOSXKeyEvent.c')
-rw-r--r--macosx/tkMacOSXKeyEvent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 4d5a98a..8e04bce 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -604,11 +604,12 @@ static void
setupXEvent(XEvent *xEvent, Tk_Window tkwin, NSUInteger modifiers)
{
unsigned int state = 0;
- Display *display = Tk_Display(tkwin);
+ Display *display;
if (tkwin == NULL) {
return;
}
+ display = Tk_Display(tkwin);
if (modifiers) {
state = (modifiers & NSAlphaShiftKeyMask ? LockMask : 0) |
(modifiers & NSShiftKeyMask ? ShiftMask : 0) |