mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 05:32:11 +00:00
* Source/NSMenu.m (_screenChanged): removed.
(initWithTitle:): remove observer for NSApplicationDidChangeScreenNotification.
This commit is contained in:
parent
f322393161
commit
e0af3bd8c9
2 changed files with 6 additions and 25 deletions
|
@ -1,3 +1,9 @@
|
|||
2020-01-23 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSMenu.m (_screenChanged): removed.
|
||||
(initWithTitle:): remove observer for
|
||||
NSApplicationDidChangeScreenNotification.
|
||||
|
||||
2020-01-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSAppearance.h,
|
||||
|
|
|
@ -254,26 +254,6 @@ static BOOL menuBarVisible = YES;
|
|||
forModes: [NSArray arrayWithObject: NSDefaultRunLoopMode]];
|
||||
}
|
||||
|
||||
/**
|
||||
Screen (monitor) properties was changed. We need to update our position
|
||||
in (possibly) new dimensions.
|
||||
*/
|
||||
- (void) _screenChanged: (id) notification
|
||||
{
|
||||
NSRect windowFrame, screenFrame;
|
||||
fprintf(stderr, "[NSMenu] NSScreen was changed.\n");
|
||||
if ([self _isVisible] != NO) {
|
||||
windowFrame = [[self window] frame];
|
||||
screenFrame = [[self window] convertRectToScreen:NSMakeRect(0,0,1,1)];
|
||||
fprintf(stderr, " Will update origin. Window: %.0f,%.0f Screen: %.0f,%.0f",
|
||||
windowFrame.origin.x, windowFrame.origin.y,
|
||||
screenFrame.origin.x, screenFrame.origin.y);
|
||||
// [self nestedSetFrameOrigin: [[self window] frame].origin];
|
||||
// [self _updateUserDefaults: notification];
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
- (void) _organizeMenu
|
||||
{
|
||||
NSString *infoString = _(@"Info");
|
||||
|
@ -732,11 +712,6 @@ static BOOL menuBarVisible = YES;
|
|||
name: NSEnqueuedMenuMoveName
|
||||
object: self];
|
||||
|
||||
[nc addObserver: self
|
||||
selector: @selector (_screenChanged:)
|
||||
name: NSApplicationDidChangeScreenParametersNotification
|
||||
object: NSApp];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue