How to get fullscreen windows on multiple screens in Linux?

I need to do two full screen (borderless) windows in a dual-monitor configuration (actually two video projectors). I’m having a surprisingly hard time getting this to work nicely, and am currently resorting to a pretty ugly hack so I’m wondering if there’s a better way.

First, let me mention I’m using NVIDIA TwinView. I tried several approaches:

  1. using PRC config variables. That gives me one nice full screen window, but it’s limited to 1 screen. (actually the correct behavior, but there’s no way to tell it to be super-full-screen across both monitors. Unless you configure xorg.conf for Xinerama I guess).

  2. open a new window, try to make it undecorated and positioned on the second monitor:

winprops = WindowProperties.getDefault()
winprops.setOrigin(1920,0)
winprops.setSize(1920,1200)
winprops.setUndecorated(True)
fbprops = FrameBufferProperties.getDefault()

self.newWin = base.graphicsEngine.makeOutput(base.pipe,"mywin",0,fbprops,winprops,GraphicsPipe.BFRequireWindow)

And then something similar to change the properties on the primary window

wp = WindowProperties.getDefault()
wp.setSize(1920,1200)
wp.setOrigin(0,0)
wp.setUndecorated(True)
base.win.requestProperties(wp)

Here’s where it gets frustrating.

In KDE4:

neither of these work. setUndecorated(True) on the main window works, but it won’t achieve full screen size. if you undecorate the new window, it disregards the position and size parameters and just plops it in the middle of the first screen. setFullscreen(True) on the main window will enlarge it, but will not undecorate, and gets blocked by the KDE panel.

I can get close by hiding the panels, but the positioning is still never quite right so there’s a sliver of desktop always showing through.

I also thought to make one very large undecorated window to span both screens. However, the width is always truncated about halfway into the second screen (e.g. if I have 2 monitors at 1024x768 and I request the window at 2048x768, it only ends up being about 1500x768).

In Gnome:

Undecorating the second window and placing it on the right screen works, but I can’t undecorate and fullsize the main window at all. Using the PRC variables doesn’t work either, it still keeps the decoration and/or won’t expand to the full height of the screen.

Here’s the only solution I’ve found:

  1. use PRC variables to fullscreen the main window
  2. create the second window and set the position, size, and undecoration
  3. run in the Openbox Window Manager!

madness! there must be a better way.

On the plus side I’m enjoying how fast and efficient OpenBox is.

It does sound pretty maddening.

The biggest problem is that there’s no standard way in Linux to request an undecorated window. The decorations are applied automatically by the window manager. You can set certain “hints” to the window manager as to how you would like the window to be represented, but there’s no hint that corresponds to an undecorated window. The closest thing to request it as a “splash” window, which is usually undecorated by convention. But it sounds like KDE also likes to center the window when you request this, and it may also limit the size.

Another possibility, though, is to take advantage of the window class name. Panda sets the class name to “Undecorated” when you request an undecorated window; and some window managers allow you to configure custom behavior for a given class name. If your window manager allows this, you can configure it not to decorate windows with the class name “Undecorated”, and you’ll be in your happy place. :slight_smile:

David

yeah, after more experiments I can get suitable results with Gnome; I think the behavior with KDE is a bug probably introduced with the rapidly shifting sands of KDE 4. KDE does have an easy way to create custom settings for windows based on all kinds of criteria (like, I have my Gimp floating windows set to Always On Top, etc.), but when I tried that, it was no longer possible to quit the panda app; the removeAllWindows() and exit() calls somehow got ignored!

If I can duplicate this in some basic C + XWindows code I’ll file a bug in KWin … or maybe figure out a solution :slight_smile:

Panda doesn’t support true fullscreen in Linux yet - but it’s on my issues list.

After a while away I’m back to working on this again, and still having the same problems… anyone else figured out a nice way to do dual-monitor full screen in linux?