mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 10:01:56 +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
|
@ -1,3 +1,9 @@
|
||||||
|
2010-05-31 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSWindow.m (-dealloc): 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.
|
||||||
|
|
||||||
2010-05-31 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2010-05-31 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSDocumentController.m (-_openableFileExtensions,
|
* Source/NSDocumentController.m (-_openableFileExtensions,
|
||||||
|
|
|
@ -767,6 +767,17 @@ many times.
|
||||||
DESTROY(mini);
|
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
|
/* Clean references to this window - important if some of the views
|
||||||
are not deallocated now */
|
are not deallocated now */
|
||||||
[_wv _viewWillMoveToWindow: nil];
|
[_wv _viewWillMoveToWindow: nil];
|
||||||
|
@ -798,11 +809,6 @@ many times.
|
||||||
*/
|
*/
|
||||||
[GSServerForWindow(self) removeDragTypes: nil fromWindow: self];
|
[GSServerForWindow(self) removeDragTypes: nil fromWindow: self];
|
||||||
|
|
||||||
if (_windowNum)
|
|
||||||
{
|
|
||||||
[self _terminateBackendWindow];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_delegate != nil)
|
if (_delegate != nil)
|
||||||
{
|
{
|
||||||
[nc removeObserver: _delegate name: nil object: self];
|
[nc removeObserver: _delegate name: nil object: self];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue