Re: Cygwin/Xfree on second (low res) monitor

2004-03-18 Thread Saul Cozens
In the abscense of anyone shouting 'nooo - you fool!'  I commented 
out lines 244, 245 of wincreatewnd.c and recompiled.

I was shocked and  surprised to find that  the hack worked.  I'm now 
going to familiarise myself with the code a bit more before suggesting 
how this feature could be implemented better.  Any hints on why the 
lines are there in the first place would still be appreciated.

cheers

Saul

Saul Cozens wrote:

Hi,

I've been playing with Cygwin/XFree86 for a few day now - and frankly 
I'm astounded - it's great!  However, I have one little query that I 
hope someone can help me with!

I have a dualhead video card in my Win2K box with monitor-1 set to 
1280x1024 and monitor-2 (an LCD screen) set to 1024x768.  I wish to 
have my Win2K desktop on monitor-1 and the KDE desktop (started via 
XDMCP) of my Debian/Linux box on monitor-2. With CygwinXfree86 I could 
then move between the environments so quickly and easily that my head 
would spin!

Now I thought that I would be able to achieve this by doing
   xwin -screen 0 1024 768 -query linuxhost -nodecoration -clipboard
and moving the resultant window to monitor-2, but xwin seems to ignore 
the screen resolution when '-nodecoration' is set.  This was confirmed 
when I looked at the source code
wincreatewnd.c 229-233
 /*
  * User gave a width and height but also said no decoration.
  * In this case we have to ignore the requested width and height
  * and instead use the largest possible window that we can.
  */
The same seems to be true for -rootless and (obviously) -fullscreen,  
And as -multiplemonitors is intended to allow the Xwindow to occupy 
BOTH monitors I'm stuck!

So can anyone tell me why (before I try osmething stupid like simply 
removing this override and recompiling) or simply tell me another way 
to achieve my dual desktop dreams!

many thanks

Saul Cozens




Re: Cygwin/Xfree on second (low res) monitor

2004-03-18 Thread Saul Cozens
Unfortunately anoncvs.xfree86.org is unreachable at the moment, so I got 
an original copy of wincreatewnd.c and did a manual diff:

$ diff wincreatewnd.c wincreatewnd.c.orig
255,256c255,256
 //iWidth = GetSystemMetrics (SM_CXSCREEN);
 //iHeight = GetSystemMetrics (SM_CYSCREEN);
---
 iWidth = GetSystemMetrics (SM_CXSCREEN);
 iHeight = GetSystemMetrics (SM_CYSCREEN);
as you said- I got the line numbers wrong - I've must've been tinkering 
elsewhere.  Anyway, I can start this up with:
   XWin.exe -query linuxbox -screen 0 1024 768 -rootless -lesspointer 
-clipboard
and I do get a 1024x768 borderless window (on my 1280x1024 monitor-1) , 
which I can then move to monitor-2 using the Matrox PowerDesk hotkey for 
'swap Active Window'.

I'm now seeing if I can add an [-offset left top] command line 
option to save me that hotkey press!

any guidance appreciated,

Saul

Harold L Hunt II wrote:

Saul,

Saul Cozens wrote:

In the abscense of anyone shouting 'nooo - you fool!'  I 
commented out lines 244, 245 of wincreatewnd.c and recompiled.


I like people compiling the source themselves and fixing their own 
problems.  Thanks for this :)

However, it would be useful if you sent in a diff so that we knew sort 
of what you were talking about and could maybe offer some tips.  I 
guess you got the code from CVS, in which case you could:

cd programs/Xserver/hw/xwin
cvs -z3 diff -u wincreatewnd.c  wincreatewnd.c.diff
If you got it from the src packages via setup.exe, then you would have 
to untar the original source and do something like the following:

cd /usr/src
diff xc-orig/programs/Xserver/hw/xwin/wincreatewnd.c \
xc/programs/Xserver/hw/xwin/wincreatewnd.c \
 wincreatewnd.c.diff
I was shocked and  surprised to find that  the hack worked.  I'm now 
going to familiarise myself with the code a bit more before 
suggesting how this feature could be implemented better.  Any hints 
on why the lines are there in the first place would still be 
appreciated.


I'm not sure why it works since I don't know what you changed. :)  I 
looked and saw comments at 244 and 245.

Harold




Cygwin/Xfree on second (low res) monitor

2004-03-17 Thread Saul Cozens
Hi,

I've been playing with Cygwin/XFree86 for a few day now - and frankly 
I'm astounded - it's great!  However, I have one little query that I 
hope someone can help me with!

I have a dualhead video card in my Win2K box with monitor-1 set to 
1280x1024 and monitor-2 (an LCD screen) set to 1024x768.  I wish to have 
my Win2K desktop on monitor-1 and the KDE desktop (started via XDMCP) of 
my Debian/Linux box on monitor-2. With CygwinXfree86 I could then move 
between the environments so quickly and easily that my head would spin!

Now I thought that I would be able to achieve this by doing
   xwin -screen 0 1024 768 -query linuxhost -nodecoration -clipboard
and moving the resultant window to monitor-2, but xwin seems to ignore 
the screen resolution when '-nodecoration' is set.  This was confirmed 
when I looked at the source code
wincreatewnd.c 229-233
 /*
  * User gave a width and height but also said no decoration.
  * In this case we have to ignore the requested width and height
  * and instead use the largest possible window that we can.
  */
The same seems to be true for -rootless and (obviously) -fullscreen,  
And as -multiplemonitors is intended to allow the Xwindow to occupy BOTH 
monitors I'm stuck!

So can anyone tell me why (before I try osmething stupid like simply 
removing this override and recompiling) or simply tell me another way to 
achieve my dual desktop dreams!

many thanks

Saul Cozens