mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 10:01:14 +00:00
Merge branch 'master' of github.com:gnustep/libs-gui into NSGridView_NSStackView_branch
This commit is contained in:
commit
84cca3fbca
2 changed files with 13 additions and 9 deletions
|
@ -1,7 +1,13 @@
|
|||
2020-11-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSMenuView.m (-mouseDown:): Protect against _window going
|
||||
away during tracking.
|
||||
|
||||
2020-11-23 Riccardo <rm@gnu.org>
|
||||
* Source/NSPopUpButtonCell.m (release):
|
||||
Use standard setMenu: in release and avoid leaking the Menu. (Proposed by Fred)
|
||||
|
||||
|
||||
2020-11-03 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSBitmapImageRep+JPEG.m (_JPEGRepresentationWithProperties:):
|
||||
|
|
|
@ -1981,9 +1981,6 @@ static float menuBarHeight = 0.0;
|
|||
*/
|
||||
- (void) mouseDown: (NSEvent*)theEvent
|
||||
{
|
||||
NSRect currentFrame;
|
||||
NSRect originalFrame;
|
||||
NSPoint currentTopLeft;
|
||||
NSPoint originalTopLeft = NSZeroPoint; /* Silence compiler. */
|
||||
BOOL restorePosition;
|
||||
/*
|
||||
|
@ -1992,9 +1989,10 @@ static float menuBarHeight = 0.0;
|
|||
*/
|
||||
restorePosition = ![_attachedMenu isTransient];
|
||||
|
||||
if (restorePosition)
|
||||
{ // store old position;
|
||||
originalFrame = [_window frame];
|
||||
if (restorePosition && (nil != _window))
|
||||
{
|
||||
// store old position;
|
||||
NSRect originalFrame = [_window frame];
|
||||
originalTopLeft = originalFrame.origin;
|
||||
originalTopLeft.y += originalFrame.size.height;
|
||||
}
|
||||
|
@ -2003,10 +2001,10 @@ static float menuBarHeight = 0.0;
|
|||
[self trackWithEvent: theEvent];
|
||||
[NSEvent stopPeriodicEvents];
|
||||
|
||||
if (restorePosition)
|
||||
if (restorePosition && (nil != _window))
|
||||
{
|
||||
currentFrame = [_window frame];
|
||||
currentTopLeft = currentFrame.origin;
|
||||
NSRect currentFrame = [_window frame];
|
||||
NSPoint currentTopLeft = currentFrame.origin;
|
||||
currentTopLeft.y += currentFrame.size.height;
|
||||
|
||||
if (NSEqualPoints(currentTopLeft, originalTopLeft) == NO)
|
||||
|
|
Loading…
Reference in a new issue