[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [platform-swt-dev] Proposed multiple monitor solution
|
Title: Message
Popups
on a win32 platform can appear outside the windows bounds, thus you don't want
to constraint the popup to the window necessarily. You do want to
constraint the popup to the current monitor you are working on
though.
Popup code would be incorrect to use getBounds(),
wouldn't it? It should be calling getClientArea, which crops out any docked
bars that Explorer may be reserving.
In which case the returned rectangle
is not necessarily at <0, 0>.
"Rob Hughes"
<rhughes@xxxxxxxxxxxxxx>

|

|

To:
<platform-swt-dev@xxxxxxxxxxx> cc: Subject: [platform-swt-dev] Proposed multiple monitor
solution
|
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