send WindowDidChangeScreen notification if window was moved to other
screen.
* Source/NSScreen.m (mainScreen): returns screen of main menu if no
key window exists. With this implementation default screen (screen at
index 0 in screens array) should never be returned.
* Source/NSMenu.m (initWithTitle:): observe WindowDidBecomeKey and
WindowDidChangeScreen notifications.
(windowDidChangeScreen:): new method to handle observed notification
added above. Moves menu to screen of key window for both cases: when
key window moved to or activated on different screen.
added observer of NSApplicationDidChangeScreenParametersNotification.
(applicationDidChangeScreenParameters:): callback for added notification -
updates window position, set new screen object and saves frame if
autosave name exists.
* Source/NSScreen.m (initialize): remove observer of
NSApplicationDidChangeScreenParametersNotification - NSScreen shouldn't
do it. Backend explicitely calls -resetScreens before posting notification.
(_initWithScreenNumber:): ditto.
(_resetScreens): removed.
(deviceDescription): removed duplicated addition of NSDeviceSize object.
* Source/NSApplication.m (finishLaunching): remove observer of
NSApplicationDidChangeScreenParametersNotification.
NSApplicationDidChangeScreenParametersNotification.
(frame): use `_frame` ivar since libs-back recreates screens list.
(dealloc): remove observer.
(applicationDidChangeScreenParameters:): update _frame and _depth
ivars for bad behaving objects which retain NSScreen and not observing
screen parameters changes.
NSApplicationDidChangeScreenParametersNotification.
(_updateScreenInfo:): removed obsever action.
(frame): get screen diension from display server (-boundsForScreen)
to get actual numbers.
from the display server instead of ignoring it and assuming 72.
The X11 server was changed to always return 72 for now, so there
is no change in behaviour on X.
On Windows we do use the system DPI/scale factor now.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33659 72102866-910b-0410-8b05-ffd578937521
NSDeviceResolution
* Source/NSImage.m: Implement -_bestRep:withResolutionMatch:
* Images/common_Dimple.tiff:
* Images/common_3DArrowRight.tiff: Add to these images
a second 'page' at 4x the original resolution which I drew.
If you use GSScaleFactor > 1 then the high resolution version
of these images should be used.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32975 72102866-910b-0410-8b05-ffd578937521
user default.
* Source/GSWindowDecorationView.m: Apply -[NSScreen userSpaceScaleFactor]
in +frameRectForContentRect and +contentRectForFrameRect, as well as
setting a scaled bounds size in -layout.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32898 72102866-910b-0410-8b05-ffd578937521
Temporarily fix the scale factor at 1.0 until the remaining parts
of the high DPI patch are committed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32896 72102866-910b-0410-8b05-ffd578937521
[screens] in method [mainScreen]. Cache screens in mehtod
[screens]. Use the context from NSApp instead of the current
context in all calls. In [deepestScreen] replace NSScreen by self.
Added method [resetScreens].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11104 72102866-910b-0410-8b05-ffd578937521
The config.h files should not be installed with the other
header files; it is only used for compilation, so the source
files should include it not the header files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2439 72102866-910b-0410-8b05-ffd578937521
Each header file includes only the header files it needs and it uses
@class to forward reference a class.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2189 72102866-910b-0410-8b05-ffd578937521