mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:20:37 +00:00
Avoid a race with some lame window managers, which could lead to a
crash when a window is closed and deallocated while a tool tip is visible. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30513 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fc76fad1a0
commit
b59b4e7e32
2 changed files with 17 additions and 5 deletions
|
@ -767,6 +767,17 @@ many times.
|
|||
DESTROY(mini);
|
||||
}
|
||||
|
||||
/* Terminate backend window early so that the receiver is no longer returned
|
||||
from GSOrderedWindows() or GSAllWindows(). This helps to prevent crashes
|
||||
due to a race with some lame window managers under X that do not update
|
||||
the _NET_CLIENT_LIST_STACKING property quickly enough. GSOrderedWindows()
|
||||
may be called (indirectly) when a tooltip is visible while a window is
|
||||
deallocated. */
|
||||
if (_windowNum)
|
||||
{
|
||||
[self _terminateBackendWindow];
|
||||
}
|
||||
|
||||
/* Clean references to this window - important if some of the views
|
||||
are not deallocated now */
|
||||
[_wv _viewWillMoveToWindow: nil];
|
||||
|
@ -798,11 +809,6 @@ many times.
|
|||
*/
|
||||
[GSServerForWindow(self) removeDragTypes: nil fromWindow: self];
|
||||
|
||||
if (_windowNum)
|
||||
{
|
||||
[self _terminateBackendWindow];
|
||||
}
|
||||
|
||||
if (_delegate != nil)
|
||||
{
|
||||
[nc removeObserver: _delegate name: nil object: self];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue