Subject: FVWM: Fullscreen + Xinerama

From: Mark <[email-masked]>
Date: Tue, 25 Jan 2005 00:08:48 +0100

Hi i was wondering if someone knew a nice way to fix a "Fullscreen" function 
that i have here.

The function now as i have it (not written by me, taken from fvwm-crystal) 
basically just saves the current state of a window, moves it to the top left 
corner of the screen, and resizes to the max of the screen.
After that some WindowStyle options are set.

Since i am using Xinerama with these settings:
XineramaSlsScreens 2  1280x1024+1280+0 1280x1024+0+0 
XineramaSls On
XineramaPrimaryScreen 0
Xinerama On

It would be nice if the function:
1. Decides on what Xinerama the window resides and adjusts the Move command to 
move it to the top left corner of the Xinerama screen.
2. Fullscreens only within the XineramaScreen it is in.

Unfortunately i have no idea how to do this.
The Function(s):
###########
DestroyFunc Fullscreen
AddToFunc Fullscreen
+ I Fullscreen-Stop
+ I Current (!Maximizable) Break
+ I TestRc (False) Fullscreen-Start

DestroyFunc Fullscreen-Start
AddToFunc Fullscreen-Start
+ I Current (State 0) Break
+ I SetEnv OldX-$[w.id] $[w.x]
+ I SetEnv OldY-$[w.id] $[w.y]
+ I SetEnv OldWidth-$[w.id] $[w.width]
+ I SetEnv OldHeight-$[w.id] $[w.height]
+ I Move 0p 0p
+ I Resize 100 100 frame
#+ I Layer 0 5
+ I WindowStyle NoTitle, !Borders, StaysOnTop, !Iconifiable, !Maximizable
+ I State 0 true

DestroyFunc Fullscreen-Stop
AddToFunc Fullscreen-Stop
#+ I Current (!State 0) Break
+ I DestroyWindowStyle
+ I State 0 false
#+ I Layer 0 4
+ I PipeRead "echo ResizeMove \\$\\[OldWidth-$[w.id]\\]p 
\\$\\[OldHeight-$[w.id]\\]p \\$\\[OldX-$[w.id]\\]p \\$\\[OldY-$[w.id]\\]p"
##########

Perhaps someone could also tell me how to fix the following problem (The above 
is sort of a workaround for this problem):
Programs that really support fullscreen like mplayer always fullscreen over 
both monitors..? How can i configure my setup so that these programs detect 
the correct width of the monitor there on ?

All the xinerama stuff still behaves somewhat strange on my setup and i really 
don't understand why, other things i notice are:
1 mplayerplug-in: When embedded in a browser it shows half of the screen, only 
when I fullscreen/restore i see the whole "picture"
2 kcontrol (Desktop -> Panels) allows you to identify your xinerama screens, 
when I click "Identify" it shows the "1" in the center of the 2 monitors, and 
the "2" centered (like it should be) on the left/secondary monitor.

Hope u have the awnsers !

Mark
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Scott Rubin <[email-masked]>
Date: Mon, 24 Jan 2005 20:32:40 -0500

Mark,

I also use xinerama and fvwm, but I do not have these problems.  At least I 
don't have them when specific applications correctly support xinerama.  For 
example, mplayer works correctly for me not spanning both screens, but always 
filling just the screen I want it to be on.  This is because of two things. 
First of all I run gentoo and I have the xinerama USE flag set.  This means that 
if there are any compile-time options to include or disclude ximerama support it 
will always be included. Second, I pass the proper command line arguments and 
have the correct configurations set for programs where this is an issue. For 
example the very last line in my /etc/mplayer.conf is xineramascreen = 1.  This 
makes it so whenever I full screen mplayer it fills up only my second xinerama 
screen, it works beautifully.  Mplayerplug-in works the same way.

As far as writing an fvwm function which will correclty full screen any 
application that will be difficult. I imagine you will have to write a seperate 
function for each app to get it to move and resize exactly right depending on 
which screen it is on.  Your best bet is to use only programs which support 
xinerama properly and to configure them to act accordingly.

Also, if you use NVidia twinview, which I do, then setting metamodes in your X 
config is very important. I used to have only one mode so when I made games go 
full screen they would stretch out across both screens. I created a metamode 
which turned off my crummy monitor and only enabled my lcd. Now when I full 
screen games at 1280x1024 my crt turns off and the game is correct.

I hope this helps. If you have any more specific questions just ask. You can see 
my ever-changing fvwm config is at http://apreche.net/~apreche/fvwm2rc.

-Scott Rubin

---

From: Mark <[email-masked]>
Date: Tue, 25 Jan 2005 03:50:23 +0100

Ok I forgot to mention that I use Twinview and not xinerama, sorry for that.

I have tracked down the issue, wel a little bit.. I use a config with a 
GF4-4600 ultra with 2 flatpanels in Twinview mode + a PCI card with only a TV 
attached. 

So i have 2 screens :0.0 (Twinview) and :0.1 Single screen on my TV, i have 
removed the TV config parts from my xorg.conf and it works like it should 
now :-)
So I guess this is a driver issue, wel it sucks because I really like the 
whole "Rightclick -> TVplay" stuff I have in konqueror...

What I hoped to recieve in response to the question about fixing the 
FullScreen function was some code (FvwmScript??) that would let me detect 
what half on the Xinerama screen a window is on. I was hoping I could learn 
from that and make functions which would for example open a new firefox 
window in the secondary screen when the primary screen already contains a 
firefox window. Stuff like that would really make the whole xinerama stuff 
really cool.

Again sorry for not providing you with the full details of the problem, I 
tested it with kde after I send the question and the problem was the same 
there.. no fvwm problem really.

So is any of you guys running fvwm-crystal with Xinerama/Twinview, if so and 
you already fixed some stuff that doesn't work well now please let  me know.
I have fixed most of the problems but not all, and some not very elegant, I 
have my config in a cvs repo now so perhaps we can share..

Mark.
On Tuesday 25 January 2005 00:08, you wrote:
> Hi i was wondering if someone knew a nice way to fix a "Fullscreen"
> function that i have here.
>
> basically just saves the current state of a window, moves it to the top
> left corner of the screen, and resizes to the max of the screen.
> 1. Decides on what Xinerama the window resides and adjusts the Move command
> to move it to the top left corner of the Xinerama screen.
> Perhaps someone could also tell me how to fix the following problem (The
> above is sort of a workaround for this problem):
> All the xinerama stuff still behaves somewhat strange on my setup and i
> really don't understand why, other things i notice are:
> 1 mplayerplug-in: When embedded in a browser it shows half of the screen,
> only when I fullscreen/restore i see the whole "picture"
> 2 kcontrol (Desktop -> Panels) allows you to identify your xinerama
> screens, when I click "Identify" it shows the "1" in the center of the 2
> monitors, and the "2" centered (like it should be) on the left/secondary
> monitor.
>