summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2024-03-19 21:54:29 (GMT)
committerfvogel <fvogelnew1@free.fr>2024-03-19 21:54:29 (GMT)
commit2a8bde2c339aac5bb8be6e4ec12dfe7b0362fc10 (patch)
tree822520ff5133d0869a7ceb4e15550b4d39c883b6 /generic
parenta2d776dc3ee2eb7456918263b8f64db51f3c6fb3 (diff)
parent29c3ce98a5f13d704cbb0e3ea06f97a9c1c4c655 (diff)
downloadtk-2a8bde2c339aac5bb8be6e4ec12dfe7b0362fc10.zip
tk-2a8bde2c339aac5bb8be6e4ec12dfe7b0362fc10.tar.gz
tk-2a8bde2c339aac5bb8be6e4ec12dfe7b0362fc10.tar.bz2
Fix [fdc0ed342d]: Segfault on focus -force with xvfb.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFocus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c
index 4438f1a..cd2df92 100644
--- a/generic/tkFocus.c
+++ b/generic/tkFocus.c
@@ -73,7 +73,7 @@ typedef struct TkDisplayFocusInfo {
#define DEBUG(dispPtr, arguments) \
if ((dispPtr)->focusDebug) { \
- printf arguments; \
+ printf arguments; fflush(stdout); \
}
/*
@@ -501,12 +501,13 @@ TkFocusFilterEvent(
if ((dispPtr->implicitWinPtr != NULL)
&& !(winPtr->flags & TK_EMBEDDED)) {
- DEBUG(dispPtr, ("Defocussed implicit Async\n"));
+ DEBUG(dispPtr, ("Defocussed implicit Async from %s\n", displayFocusPtr->focusWinPtr->pathName));
GenerateFocusEvents(displayFocusPtr->focusWinPtr, NULL);
XSetInputFocus(dispPtr->display, PointerRoot, RevertToPointerRoot,
CurrentTime);
displayFocusPtr->focusWinPtr = NULL;
dispPtr->implicitWinPtr = NULL;
+ dispPtr->focusPtr = NULL;
}
}
return retValue;