[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Proposed multiple monitor solution
|
We've been looking at something similar already.
If you'd like us to take a look at your code, go ahead and submit it. I'm
not sure what we're going to do yet though. I'd like to get the best
possible "default" (i.e. no UI team changes) appearance on a multiple
monitor configuration, which probably means that getBounds may have to be
redefined to be "getVirtualBounds". The case I'm thinking about is saving
and restoring window positions during exit/restart of Eclipse.
McQ.
"Rob Hughes"
<rhughes@xxxxxxxxxxxxxx To: <platform-swt-dev@xxxxxxxxxxx>
> cc:
Sent by: Subject: [platform-swt-dev] Proposed multiple monitor solution
platform-swt-dev-admin@
eclipse.org
05/21/02 04:40 PM
Please respond to
platform-swt-dev
I would like to propose a solution to the multi-monitor problem. The
problem mainly arises when the programmer tries to constrain a popup or
something similar to the monitor so it doesn't show up off the screen.
This is done via Display.getBounds(). However on win32 platforms this
call does a GetSystemMetrics() call to determine the screen bounds.
This call is limited due to the fact that it always returns the bounds
of the primary screen, which may or may not be what is required.
1: Display.getBounds(). Modified to return the bound of the monitor
that the app is primarily running on.
2: Add Display.getBounds(point p). Get the bounds of the monitor that
contains the point.
3: Add Display.getVirtualBounds(). Get the bounds of all monitors put
together in a big virtual bounds.
However this does not totally fix the problem as the code which
constrains popups incorrectly assumes that the x,y coordinates of the
returned bounds is 0,0.
I have implemented this solution on the win32 platform. If the dev team
accepts the solution I will submit it as a patch.
Rob Hughes
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev