RE: Multimonitor screen

2003-03-28 Thread Nick Crabtree
Xwin -multiplemonitors -rootless
Wmaker
xterm -geometry +1600+0

Puts an xterm at the top left of my second monitor (My system has three
monitors each at 1600x1200)


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Lester Caine
Sent: 28 March 2003 11:20
To: [EMAIL PROTECTED]
Subject: Re: Multimonitor screen


 So next question on the list ( unless I find it first ) I have startx
 configured to go into kde2, but I can't see at present where I tell XWin 
 to use both monitors when it loads. Obviously I am still finding my way 
 around the scripts, so some further kicks in the right direction would 
 help.

OK that was too easy. I'm getting the hang of this now. So 
all that is outstanding is How do I start a window OTHER 
than at 0,0 ? ( I may actually be getting to a point where 
I could program it myself, but lets stick with what is 
available first g )

Now that I can get into KDE, reading the man stuff is 
easier, the old grey cells are warming up and I can remember 
how to do things, but how do I find out what I should be 
doing with the likes of .xserverrc -if at all - i.e. Is 
there a recomended way of setting up configurations?

-- 
Lester Caine
-
L.S.Caine Electronic Services


_
This e-mail has been scanned for viruses by the WorldCom Internet Managed
Scanning Service - powered by MessageLabs. For further information visit
http://www.worldcom.com



RE: two new -multiwindow bugs

2003-03-24 Thread Nick Crabtree
Jack,

Which of your monitors is the primary? I'm guessing it is the right hand one
(note that monitor 1 is not necessarily the primary, you have the choice).
If you set the primary monitor to be the left hand one then the xterm will
appear on the same monitor for both cases below.

If it really matters to you then I could have a look at the code.

Regards,

Nick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Jack Tanner
Sent: 17 March 2003 23:11
To: [EMAIL PROTECTED]
Subject: two new -multiwindow bugs


(By new, I mean not discussed here before, not new as in only present in

the most recent release.)

Thank you for your time and effort, Kensuke, Harold, et. al.

I have two monitors, monitor 2 is physically left of monitor 1. 
XFree86-xserv 4.2.0-28.

0) the repeated keystrokes bug is still present in this release
http://www.cygwin.com/ml/cygwin-xfree/2003-03/msg00059.html

1) window positioning bug

# Xwin -rootless -multiplemonitors -clipboard
# xterm -geometry +34+5

The xterm is positioned in the upper left-hand corner of monitor 2.

# Xwin -multiwindow -multiplemonitors -clipboard
# xterm -geometry +34+5

The xterm is positioned in the upper left-hand corner of monitor 1.

Presumably, the xterm should get positioned on the same monitor regardless 
whether I use -rootless or -multiwindow.

2) window title bug

# Xwin -rootless -multiplemonitors -clipboard
# xterm -geometry +34+5
# TERM=xterm; export TERM
# xterm -e bash -i -c ssh -X [EMAIL PROTECTED]

The xterm window gets a title like [EMAIL PROTECTED]:~. This is very pretty and 
very useful when you open a gazillion xterms, like I do. (The remote machine

has an /etc/bashrc that sets up $PROMPT_COMMAND appropriately. For my stock 
RedHat 8 install, it's PROMPT_COMMAND='echo -ne 
\033]0;[EMAIL PROTECTED]:${PWD/#$HOME/~}\007'.)

# Xwin -multiwindow -multiplemonitors -clipboard
[snip. same xterm, TERM and ssh setup as above, but note -multiwindow, not 
-rootless Xwin invocation]

The xterm window gets the title bash. Awful, boring title.

Best,
JT


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


_
This e-mail has been scanned for viruses by the WorldCom Internet Managed
Scanning Service - powered by MessageLabs. For further information visit
http://www.worldcom.com



RE: FW: Test77 multiwindow mouse weirdness

2003-02-13 Thread Nick Crabtree
Harold,

The assumption that the screen origin is 0,0 is one of the things I had
to fix for the multiple monitors patch. In general SM_XSCREEN and
SM_YSCREEN should _always_ be used to discover the origin (or more
generally SM_XVIRTUALSCREEN ...). In most configurations this will
indeed return 0,0 but it should not be assumed that this is the case.

I had also noticed this problem with multiwindow mode on my twin monitor
set-up. If I set my left screen to be the primary then the origin is 0,0
and multiwindow mode stretches across both monitors. If the right screen
is primary then the origin is -1200,0 and mutiwindow mode only works on
the right monitor.

I was going to have a look at this in a few weeks when I should have
some spare time.

Nick

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Harold L Hunt II
Sent: 12 February 2003 22:14
To: [EMAIL PROTECTED]
Subject: Re: FW: Test77 multiwindow mouse weirdness


Piers,

Yes, that is strange.  I think the problem is that, as you said, the 
multiwindow mode is assuming that the screen is based at 0, 0.  That 
isn't a problem for the non-multiwindow mode, but there was obviously 
some sort of oversight in the multiwindow mode that caused this problem 
to show up.  I may look into it eventually, but if you have any 
inclination to peek at the source yourself (it is accessible via cvsweb 
and well commented) then I would appreciate it if you could try to 
locate the problem for me.

Harold

Harold L Hunt II wrote:
 Here is a message from Piers Haken reporting a problem with 
 mutliwindow
 mode.  His emails get bounced because Exchange insists on munging his 
 email.
 
 Harold
 
   -Original Message-
   From: Piers Haken
   Sent: Tuesday, February 11, 2003 11:22 PM
   To: '[EMAIL PROTECTED]'
   Subject: Test77 multiwindow mouse weirdness
  
  
   I'm seeing some weirdness with the mouse cursor in Test77's 
 multiwindow   mode.  
   Note: I have my windows taskbar attached to the left-hand edge of
the
   screen instead of the bottom.
  
   Here's how to see what I'm seeing:
   1) install test77
   2) unlock the taskbar.
   3) dock the taskbar to the left-hand side of the screen
   4) run 'XWin-Test77 -multiwindow'
   5) open an xterm
   6) look at the position of the xterm window.
   7) now click on the 'Cygwin/XFree86 rl' window so the root is
visible.
   Notice how the position of the xterm window is different
   depending on whether or not the root window is shown. When the root
   window is shown the xterm jumps to the right exactly by the width
of the
   taskbar.
  
   8) while the root window is on top, move the mouse around.
   Notice that the mouse cursor occasionally jumps to the
right,
   again by the same amount as the width of the taskbar.
  
   9) show both the root window AND the xterm, so the multiwindow
xterm
   with the windows decorations is on top of the root window.
  
   Notice that the two versions of the xterm window do not
line up.
  
   I know this isn't a very common or very severe bug but it does seem
to
   indicate an underlying problem in the calculation of the desktop
   bounding rectangle. Perhaps you're assuming, incorrectly in
general,
   that the desktop starts at (0,0)?
  
   Piers.
  
 


_
This e-mail has been scanned for viruses by the WorldCom Internet
Managed Scanning Service - powered by MessageLabs. For further
information visit http://www.worldcom.com




RE: FW: Test77 multiwindow mouse weirdness

2003-02-13 Thread Nick Crabtree
By desktop do you mean monitor? If so, yes you can using the current
code - if you choose the correct one as primary.

Nick


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Piers Haken
Sent: 13 February 2003 09:53
To: [EMAIL PROTECTED]
Subject: RE: FW: Test77 multiwindow mouse weirdness


Resend

 -Original Message-
 From: Piers Haken
 Sent: Thursday, February 13, 2003 1:46 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: FW: Test77 multiwindow mouse weirdness
 
 
 Can you drag a multiwindow so half of it show on one desktop
 and the other hald on another?
 
 This probably should be a somewhat lofty goal...
 
 Piers.
 
  -Original Message-
  From: Nick Crabtree [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, February 13, 2003 12:21 AM
  To: [EMAIL PROTECTED]
  Subject: RE: FW: Test77 multiwindow mouse weirdness
  
  
  Harold,
  
  The assumption that the screen origin is 0,0 is one of the things I 
  had to fix for the multiple monitors patch. In general SM_XSCREEN 
  and SM_YSCREEN should _always_ be used to discover the origin (or 
  more generally SM_XVIRTUALSCREEN ...). In most configurations this 
  will indeed return 0,0 but it should not be assumed that this is the

  case.
  
  I had also noticed this problem with multiwindow mode on my twin 
  monitor set-up. If I set my left screen to be the primary then the 
  origin is 0,0 and multiwindow mode stretches across both monitors. 
  If the right screen is primary then the origin is -1200,0 and 
  mutiwindow mode only works on the
 right monitor.
  
  I was going to have a look at this in a few weeks when I should have

  some spare time.
  
  Nick
  
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]] On Behalf Of Harold L Hunt II
  Sent: 12 February 2003 22:14
  To: [EMAIL PROTECTED]
  Subject: Re: FW: Test77 multiwindow mouse weirdness
  
  
  Piers,
  
  Yes, that is strange.  I think the problem is that, as you said, the

  multiwindow mode is assuming that the screen is based at 0,
 0.  That
  isn't a problem for the non-multiwindow mode, but there was
 obviously
  some sort of oversight in the multiwindow mode that caused
  this problem 
  to show up.  I may look into it eventually, but if you have any 
  inclination to peek at the source yourself (it is accessible 
  via cvsweb 
  and well commented) then I would appreciate it if you could try to 
  locate the problem for me.
  
  Harold
  
  Harold L Hunt II wrote:
   Here is a message from Piers Haken reporting a problem with
   mutliwindow mode.  His emails get bounced because 
 Exchange insists
   on
  munging his
   email.
   
   Harold
   
 -Original Message-
 From: Piers Haken
 Sent: Tuesday, February 11, 2003 11:22 PM
 To: '[EMAIL PROTECTED]'
 Subject: Test77 multiwindow mouse weirdness


 I'm seeing some weirdness with the mouse cursor in Test77's
   multiwindow   mode. Note: I have my windows 
 taskbar attached
   to the left-hand edge of
  the
 screen instead of the bottom.

 Here's how to see what I'm seeing:
 1) install test77
 2) unlock the taskbar.
 3) dock the taskbar to the left-hand side of the
 screen   4) run
   'XWin-Test77 -multiwindow'   5) open an xterm
 6) look at the position of the xterm window.
 7) now click on the 'Cygwin/XFree86 rl' window so the root is
  visible.
 Notice how the position of the xterm window is 
 different
 depending on whether or not the root window is shown.
  When the root
window is shown the xterm jumps to the right exactly by
 the width
  of the
 taskbar.

 8) while the root window is on top, move the mouse around.
 Notice that the mouse cursor occasionally jumps to the
  right,
 again by the same amount as the width of the taskbar.  
 9) show both the root window AND the xterm, so the multiwindow
  xterm
 with the windows decorations is on top of the root window.  
 Notice that the two versions of the xterm window do not
  line up.

 I know this isn't a very common or very severe bug but
  it does seem
  to
 indicate an underlying problem in the calculation of the
  desktop  
   bounding rectangle. Perhaps you're assuming, incorrectly in
  general,
 that the desktop starts at (0,0)?

 Piers.

   
  
  
  
 _
  This e-mail has been scanned for viruses by the WorldCom Internet 
  Managed Scanning Service - powered by MessageLabs. For further 
  information visit http://www.worldcom.com
  
  
 

_
This e-mail has been scanned for viruses by the WorldCom Internet
Managed Scanning Service - powered by MessageLabs. For further
information visit http://www.worldcom.com




Patch for multiple monitors

2003-01-10 Thread Nick Crabtree
Hi,

I attach a patch for multiple monitors, diffed against
xwin-20021107-0015. I have added a command-line flag -multiplemonitors
which activates the extra code.

This works on my machine in both windowed and rootless modes for engines
1, 2 and 4. It does not work in fullscreen mode because the defaults for
the fullscreen dimensions are calculated before the command line
parameters are parsed (as far as I could figure out).

It should be possible to make this behaviour the default (SM_CXSCREEN ==
SM_CXVIRTUALSCREEN etc. if there is only one monitor), which would
remove many of the if {} else {} blocks, and also might make fullscreen
mode work

My machine is running Windows 2000. Both my graphics cards are set at
1600x1200 32bit colour. It's great - I'm running KDE in rootless mode,
and I get the kicker across the bottom of both monitors, and I can drag
X windows from one monitor to the other ...

Comments?

Nick

diff -uw ./InitOutput.c
../../x-devel/build/opt/programs/Xserver/hw/xwin/InitOutput.c
--- ./InitOutput.c  2002-11-07 05:21:18.0 +
+++ ../../x-devel/build/opt/programs/Xserver/hw/xwin/InitOutput.c
2003-01-09 16:51:10.0 +
@@ -114,7 +114,8 @@
   /* Zero the memory used for storing the screen info */
   ZeroMemory (g_ScreenInfo, MAXSCREENS * sizeof (winScreenInfo));
 
-  /* Get default width and height */
+  /* Get default width and height. These will just be for the primary
+ monitor in the case that we have multiple monitors. */
   dwWidth = GetSystemMetrics (SM_CXSCREEN);
   dwHeight = GetSystemMetrics (SM_CYSCREEN);
 
@@ -139,6 +140,7 @@
   g_ScreenInfo[i].fFullScreen = FALSE;
   g_ScreenInfo[i].fDecoration = TRUE;
   g_ScreenInfo[i].fRootless = FALSE;
+  g_ScreenInfo[i].fMultiplemonitors = FALSE;
   g_ScreenInfo[i].fLessPointer = FALSE;
   g_ScreenInfo[i].fScrollbars = FALSE;
   g_ScreenInfo[i].iE3BTimeout = WIN_E3B_OFF;
@@ -303,6 +305,10 @@
   ErrorF (-rootless\n
  \tEXPERIMENTAL: Run the server in pseudo-rootless mode.\n);
 
+  ErrorF (-multiplemonitors\n
+ \tEXPERIMENTAL: Use the entire virtual screen if multiple\n
+ \tmonitors are present.\n);
+
   ErrorF (-scrollbars\n
  \tIn windowed mode, allow screens bigger than the Windows
desktop.\n
  \tMoreover, if the window has decorations, one can now
resize\n
@@ -653,6 +659,32 @@
 }
 
   /*
+   * Look for the '-multiplemonitors' argument
+   */
+  if (strcmp (argv[i], -multiplemonitors) == 0)
+{
+  /* Is this parameter attached to a screen or is it global? */
+  if (-1 == g_iLastScreen)
+   {
+ int   j;
+
+ /* Parameter is for all screens */
+ for (j = 0; j  MAXSCREENS; j++)
+   {
+ g_ScreenInfo[j].fMultiplemonitors = TRUE;
+   }
+   }
+  else
+   {
+ /* Parameter is for a single screen */
+ g_ScreenInfo[g_iLastScreen].fMultiplemonitors = TRUE;
+   }
+
+  /* Indicate that we have processed this argument */
+  return 1;
+}
+
+  /*
* Look for the '-scrollbars' argument
*/
   if (strcmp (argv[i], -scrollbars) == 0)
diff -uw ./win.h ../../x-devel/build/opt/programs/Xserver/hw/xwin/win.h
--- ./win.h 2002-11-07 05:33:17.0 +
+++ ../../x-devel/build/opt/programs/Xserver/hw/xwin/win.h
2003-01-09 16:51:38.0 +
@@ -390,6 +390,7 @@
   Bool fFullScreen;
   Bool fDecoration;
   Bool fRootless;
+  Bool  fMultiplemonitors;
   Bool fLessPointer;
   Bool fScrollbars;
   int  iE3BTimeout;
diff -uw ./wincreatewnd.c
../../x-devel/build/opt/programs/Xserver/hw/xwin/wincreatewnd.c
--- ./wincreatewnd.c2002-10-19 04:56:52.0 +0100
+++ ../../x-devel/build/opt/programs/Xserver/hw/xwin/wincreatewnd.c
2003-01-10 15:11:26.0 +
@@ -31,16 +31,17 @@
 
 #include win.h
 #include shellapi.h
 
 /*
  * Local function prototypes
  */
 
 static Bool
+winGetWorkArea (RECT *prcWorkArea, winScreenInfo *pScreenInfo);
+static Bool
 winAdjustForAutoHide (RECT *prcWorkArea);
 
-
 /*
  * Create a full screen window
  */
@@ -155,7 +156,7 @@
   RegisterClass (wc);
 
   /* Get size of work area */
-  SystemParametersInfo (SPI_GETWORKAREA, 0, rcWorkArea, 0);
+  winGetWorkArea (rcWorkArea, pScreenInfo);
 
   /* Adjust for auto-hide taskbars */
   winAdjustForAutoHide (rcWorkArea);
@@ -206,10 +207,18 @@
   * In this case we have to ignore the requested width and
height
   * and instead use the largest possible window that we can.
   */
+ if (pScreenInfo-fMultiplemonitors)
+   {
+ iWidth = GetSystemMetrics (SM_CXVIRTUALSCREEN);
+ iHeight = GetSystemMetrics (SM_CYVIRTUALSCREEN);
+   }
+ else
+   {
  iWidth = GetSystemMetrics (SM_CXSCREEN);
  iHeight = GetSystemMetrics (SM_CYSCREEN);
}
 }
+