Closed
Bug 344323
Opened 18 years ago
Closed 18 years ago
Allow nsCocoaWindow instances to be displayed on secondary monitors
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: nick.kreeger, Assigned: vlad)
References
Details
Attachments
(1 file)
(deleted),
patch
|
pavlov
:
superreview+
|
Details | Diff | Splinter Review |
Currently, in |nsCocoaWindow::Move()| we only find the position where the cocoa window should be displayed on the primary monitor:
//FIXME -- doesn't work on monitors other than primary
NSRect screenRect = [[NSScreen mainScreen] frame];
Reporter | ||
Comment 1•18 years ago
|
||
This may help:
erence/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#//apple_ref/c/data/NSApplicationDidChangeScreenParametersNotification
Reporter | ||
Comment 2•18 years ago
|
||
(In reply to comment #1)
> This may help:
> erence/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#//apple_ref/c/data/NSApplicationDidChangeScreenParametersNotification
>
Actually this will:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#//apple_ref/c/data/NSApplicationDidChangeScreenParametersNotification
Updated•18 years ago
|
Summary: Alow nsCocoaWindow instances to be displayed on secondary monitors. → Allow nsCocoaWindow instances to be displayed on secondary monitors
Comment 3•18 years ago
|
||
The gecko/cocoa rect conversion utilities also get their info for the first (main) screen only, afaics.
On a related note, I recently filed bug 344108 to move these kind of utilites to somewhere "global". (So that, for example, I don't re-do the same mistakes by copying code into /accessible/src/mac.) See that bug for more info.
Assignee | ||
Comment 4•18 years ago
|
||
The entire multi-screen stuff is such a disaster. This patch does a few things:
- Implements Cocoa Screen/ScreenManager code
- Adds a method to ScreenManager for getting the nsIScreen of a widget directly, instead of doing the rect dance
- Implement that method for cocoa/win/gtk2. (Hmm, additional patch for non-cocoa mac screenamanager stub, which will never be called coming soon.)
This is a good start, but nsIDeviceContext is scheduled for gutting. The code that ends up using this, in particular nsIDeviceContext::GetRect, really should be querying the widget directly for a lot of cases, unless it's printing. But that cleanup is for another time.
Assignee: nick.kreeger → vladimir
Status: NEW → ASSIGNED
Attachment #236302 -
Flags: superreview?(pavlov)
Attachment #236302 -
Flags: review?(mark)
Comment 5•18 years ago
|
||
Comment on attachment 236302 [details] [diff] [review]
fix for popup positioning
please test on windows!
Attachment #236302 -
Flags: superreview?(pavlov) → superreview+
Comment 6•18 years ago
|
||
Vlad, does this fix/help bug 350018?
Assignee | ||
Comment 7•18 years ago
|
||
(In reply to comment #6)
> Vlad, does this fix/help bug 350018?
It doesn't; I left that as a to-do item (getting the coordinate spaces right), becuase I wasn't quite sure how to fix it correctly. Things seemed to "just work", that is popups and the like were appearing in the right spots, so I didn't want to poke at it too much. But I do need to make sure that the right coordinate space is used, because this type of stuff that "just works" introduces hard bugs to track down later on (as I discovered with the quartz cairo surface code).
Assignee | ||
Comment 8•18 years ago
|
||
Tested on windows, seems to work fine.
Assignee | ||
Comment 9•18 years ago
|
||
Tested on mac, windows, linux; landing shortly.
Comment 10•18 years ago
|
||
This broke GTK1 builds. Sadly, some of our tinderbox test builds (balsa comes to mind) are GTK1. So the tree is closed pending that getting fixed...
Comment 11•18 years ago
|
||
this looks good to me.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Attachment #236302 -
Flags: review?(mark)
You need to log in
before you can comment on or make changes to this bug.
Description
•