diff options
author | fvogel <fvogelnew1@free.fr> | 2019-08-28 20:12:39 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-08-28 20:12:39 (GMT) |
commit | 1dd886e5882026dc5c89cb801251c13cfa070238 (patch) | |
tree | 158cf25bc46767a9b762ecd609fbaa28e49ffde5 /generic | |
parent | b11c06fd0f8e1a52abeffb9aa2a9ee4055e35e83 (diff) | |
parent | d4ee00e26e9b7ab6c7eb33ef4c8e1c29ff73aa1e (diff) | |
download | tk-1dd886e5882026dc5c89cb801251c13cfa070238.zip tk-1dd886e5882026dc5c89cb801251c13cfa070238.tar.gz tk-1dd886e5882026dc5c89cb801251c13cfa070238.tar.bz2 |
Fix [943d5ebe51]: Destroying a widget cancels resizing of main window on Windows.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkInt.decls | 3 | ||||
-rw-r--r-- | generic/tkIntPlatDecls.h | 8 | ||||
-rw-r--r-- | generic/tkPointer.c | 10 | ||||
-rw-r--r-- | generic/tkStubInit.c | 3 |
4 files changed, 23 insertions, 1 deletions
diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 7b83861..62441e5 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -844,6 +844,9 @@ declare 45 win { int TkpTestsendCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) } +declare 47 win { + Tk_Window TkpGetCapture(void) +} ################################ # Aqua specific functions diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 26a5f46..f496e55 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -142,6 +142,9 @@ EXTERN void TkSendCleanup(TkDisplay *dispPtr); EXTERN int TkpTestsendCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +/* Slot 46 is reserved */ +/* 47 */ +EXTERN Tk_Window TkpGetCapture(void); #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ /* 0 */ @@ -341,6 +344,8 @@ typedef struct TkIntPlatStubs { void (*tkWmCleanup) (TkDisplay *dispPtr); /* 43 */ void (*tkSendCleanup) (TkDisplay *dispPtr); /* 44 */ int (*tkpTestsendCmd) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 45 */ + void (*reserved46)(void); + Tk_Window (*tkpGetCapture) (void); /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ void (*tkGenerateActivateEvents) (TkWindow *winPtr, int active); /* 0 */ @@ -522,6 +527,9 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr; (tkIntPlatStubsPtr->tkSendCleanup) /* 44 */ #define TkpTestsendCmd \ (tkIntPlatStubsPtr->tkpTestsendCmd) /* 45 */ +/* Slot 46 is reserved */ +#define TkpGetCapture \ + (tkIntPlatStubsPtr->tkpGetCapture) /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ #define TkGenerateActivateEvents \ diff --git a/generic/tkPointer.c b/generic/tkPointer.c index de9d49d..f764904 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -503,7 +503,15 @@ TkPointerDeadWindow( tsdPtr->restrictWinPtr = NULL; } if (!(tsdPtr->restrictWinPtr || tsdPtr->grabWinPtr)) { - TkpSetCapture(NULL); + + /* + * Release mouse capture only if the dead window is the capturing + * window. + */ + + if (winPtr == (TkWindow *)TkpGetCapture()) { + TkpSetCapture(NULL); + } } } diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 7e02302..b531933 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -178,6 +178,7 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) # define TkAlignImageData 0 # define TkGenerateActivateEvents 0 # define TkpGetMS 0 +# define TkpGetCapture 0 # define TkPointerDeadWindow 0 # define TkpSetCapture 0 # define TkpSetCursor 0 @@ -505,6 +506,8 @@ static const TkIntPlatStubs tkIntPlatStubs = { TkWmCleanup, /* 43 */ TkSendCleanup, /* 44 */ TkpTestsendCmd, /* 45 */ + 0, /* 46 */ + TkpGetCapture, /* 47 */ #endif /* WIN */ #ifdef MAC_OSX_TK /* AQUA */ TkGenerateActivateEvents, /* 0 */ |