Lisp HUG Maillist Archive

Open interface on second screen

hello!

Our customers are complaining that with our new LWW 4.3-based beta,
windows that should open on a second screen get cluttered on their
main screen, making our stock trading tool almost useless (these
traders often use even more than 4 displays!).

I have some problems getting a dual monitor to work on my Win XP
development machine, but on my PowerBook with LWM, I can reproduce
the problem:

CL-USER 26 > (capi:top-level-interface-geometry (capi:top-level-interface (capi:contain (make-instance 'capi:title-pane :title "Foo") :best-x 1600 )))
980
200
44
44

Cl-USER 27 > (capi:top-level-interface-geometry eple)
1833
451
360
300

The first form tries to open a window on the external screen (this is a
12" PB which has a 1024 pixels wide screen) and fails.

The second form shows that a window that has been _dragged_ to a
position on the external screen indeed has an x-value which corresponds
to origo in the upper left corner of the interal screen.

Is this a bug, or am I missing something?
-- 
  (espen)


Re: Open interface on second screen

Unable to parse email body. Email id is 2665

Re: Open interface on second screen

davef@xanalys.com writes:

> LispWorks4.3 checks the bounds of the screen when doing CAPI:DISPLAY
> to force the window to be entirely on the screen. It used to do that
> in previous versions for dialogs: LispWorks4.3 only changed the
> behaviour for non-dialog windows.
>
> Does your application work OK on multiple screens when built with
> LispWorks4.2. Does it use dialogs? Did you or your customers notice
> any problems with dialogs?

I have no idea how many of our customers might be using multiple
display setup, but I assume there are quite a few, we have some
very active stock traders as customers, and these people quite
often use _lots_ of screens. 

Only a small fraction of our customers is using our new 4.3-based
beta, and one of these is the first ever to have reported a multiple
screen problem. For him, our 4.3-based version is practically
useless compared to the previous version, since he must repeat
his tedious customization work every day.

> How do you decide which coordinates to use?

Initially, the user decides this by simply dragging his windows to the
secondary display.  The problems occur when he saves his window setup
(which may consist of more than 50 windows on 2 or more high
resolution screen).  The values returned from
top-level-interface-geometry are stored (unchecked) in the user's
setup file. On the next startup, our application will use these values
as :best-x and :best-y, which with 4.2 apparently at least for some
users would place the windows on the second screen as expected.

This is a very critical issue to us, we can't release our new
version if it doesn't support multiple screens at least in the
way our 4.2-based version did, and we need to release a new
beta of this new version within a few days in order to support
some new products that we have introduced. 

I don't think reverting to 4.2.7 is an option, I've been developing 
with 4.3 for months now, so I'm not even sure if it compiles with 
4.2 any more.

-- 
  (espen)


Re: Open interface on second screen

Unable to parse email body. Email id is 2667

Re: Open interface on second screen

On Jul 29, 2004, at 9:17 AM, Espen Vestre wrote:

> I have some problems getting a dual monitor to work on my Win XP
> development machine, but on my PowerBook with LWM, I can reproduce
> the problem:

I don't know if this is related, but I reported an issue with multiple 
screens a few months ago:

DESCRIPTION: I have a debugging interface I use to test delivery opened 
like this to put it on my second monitor:

(display (make-instance 'debug-interface :owner (or (second (screens)) 
(convert-to-screen))))

Problem is that after doing this (first, after the application starts) 
the second screen (which does not have the menubar) is now the default 
screen -- it is always the value returned by (convert-to-screen). It 
seems like the default screen on OS X should be the one with the 
menubar, that is, the value returned by [[NSScreen screens] 
objectAtIndex:0].


This is with 4.3.7 Mac (I don't have a Windows setup with multiple 
monitors to test).

I was wondering if a possible work-around for your issue would be to 
save screen number and use the :owner keyword with coordinates relative 
to the single screen rather than the union of all of the screens.

Best,

John DeSoi, Ph.D.


Re: Open interface on second screen

John DeSoi <jd@icx.net> writes:

> I was wondering if a possible work-around for your issue would be to
> save screen number and use the :owner keyword with coordinates
> relative to the single screen rather than the union of all of the
> screens.

That was my first idea, but as far as I can tell, there is only
one capi screen available even when I have two physical screens.
-- 
  (espen)


Re: Open interface on second screen

John DeSoi <jd@icx.net> writes:

> Ah, then things must be different between capi on Mac and
> Windows. Something I'll need to look out for...
>
>  > (capi:screens)
> (#<COLOR-SCREEN 0 Cocoa> #<COLOR-SCREEN 1 Cocoa>)

Not necessarily, I was speaking of Mac, and I only saw one screen
on my mac (PB 12" with additional analog 1280x1024 external monitor).
-- 
  (espen)


Re: Open interface on second screen

John DeSoi <jd@icx.net> writes:

>  > (capi:screens)
> (#<COLOR-SCREEN 0 Cocoa> #<COLOR-SCREEN 1 Cocoa>)

FYI, after investigating a little more, I discovered that I
apparently get as many capi:screens as there are screens attached
as LW starts up (Another observation: Dragging a window to the 
second screen will still make convert-to-screen return the first
screen and the coordinates will be relative to the origo of the
first screen).
-- 
  (espen)


Updated at: 2020-12-10 08:55 UTC