You are not logged in.

#1 2010-07-24 21:40:52

andreamer
Member
Registered: 2009-08-11
Posts: 41

[SOLVED] openbox margins with dual monitors

Hi community,
I have stumbled to a nasty problem on my first incursion to dual monitors in openbox.

I'm using xrandr with this command (which works just fine BTW):

xrandr --output LVDS --mode 1280x800 --primary --output VGA-0 --mode 1280x1024_60.00 --gamma 1.0:1.4:0.85 --right-of LVDS

and have set a Virtual screen in xorg.conf of 2560 x 1024 pixels.

But, my laptop monitor only handles 1280x800, while my external LCD monitor has 1280x1024, so there is a virtual area under my laptop screen which i'm not using, but i dont really care about that.

The problem is that when I'm setting screen margins, so that maximized windows will respect the panels in the bottom (tint2), in rc.xml (or by obconf) the margins are applied to the virtual screen and only are practical on the external monitor wich has more pixel height.

I'm really missing some kind of per monitor margin settings in openbox, maybe there is and i haven't found it? It makes me wonder because openbox can maximize windows to a single monitor, even if the whole layout it's treated like a virtual screen, so it has some way of distinguishing between them.

I would appreciate any suggestions, thanks.

Last edited by andreamer (2010-07-26 18:32:15)

Offline

#2 2010-07-24 22:29:58

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [SOLVED] openbox margins with dual monitors

TL;DR - I'm not aware of any acceptable solution at the moment.

Basically, what you're having problems with, is the "dead area." It can really be quite a pain in the butt if window managers or other screen aware applications don't anticipate it properly. To my knowledge, Openbox doesn't support margins on a monitor-by-monitor basis. In reality, you shouldn't need to be setting margins anyway. Tint2 should be reporting itself as a taskbar, and Openbox should be respecting that.

I have dead area too, with multiple monitors, and Openbox respects both of the KDE taskbars I have running (one on each monitor). (I use KDE and simply replaced Kwin with Openbox.) This tells me that tint2 should be able to cooperate with Openbox. I remember trying tint2 a while ago, and didn't fine it adequate in a dual monitor environment (it was probably a year ago or so). tint2 would need to be setting the _NET_WM_STRUT_PARTIAL hint, and I'm not sure if it is (or if it's doing it properly). See http://standards.freedesktop.org/wm-spe … #id2507618

Also, I do know that the developer for Openbox recently got a dual monitor setup, and she's been adding additional support for dual monitors a little at a time. Hopefully with 3.5, there will be a lot more support. (Margin support for multiple monitors would be great, because it could be a good utility knife for applications that don't care about multi-monitors setups and don't set the proper hints.)

If you're capable of modifying tint2, my course of action would be to try something that works (like the KDE taskbars) and record the hints being set there. Then compare them with tint2 and try to mirror KDE's setup. (If you're a programming lacking experience with X and related nonsense, I'd be more than willing to offer what guidance I have.)

Also, I developed a panel myself (and got pretty far along) using the PyGTK toolkit... But I can't remember if I solved this problem or not. I'll try to check it out and get back to you. (I got as far as implementing a widget system that includes a task list, system tray, clock, menus... It just isn't polished very well. My original intention was for it to be a more robust PyPanel with dual monitor support.)

Last edited by BurntSushi (2010-07-24 22:46:23)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#3 2010-07-24 23:57:09

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [SOLVED] openbox margins with dual monitors

I just checked my panel program... First of all, it's a freakin mess. Second of all, it doesn't appear that I solved it. I could have sworn that I did. The problem is clearly solvable, though. I'm sitting here with 800x600 on one monitor (just to test!) and 1280x1024 on the other... With just openbox and my panel, the windows maximize to the full screen and ignore the panel... With KDE taskbars, the window maximizes until it hits the panel.

I'm sorry I can't dig any deeper than that, but that tells me there's something that tint2 (and my panel) should be doing.

I know a lot of people don't like the blout of KDE or any DE, but I've found the KDE environment to work very well with my dual monitor setup. If you can bare the bloat, I'd definitely recommend giving it a shot.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#4 2010-07-26 08:08:32

thil77
Member
Registered: 2008-08-29
Posts: 52

Re: [SOLVED] openbox margins with dual monitors

see http://code.google.com/p/tint2/wiki/FAQ … over_tint2

If you don't want maximized window to cover tint2 :

panel_layer = top
strut_policy = follow_size

Offline

#5 2010-07-26 18:30:37

andreamer
Member
Registered: 2009-08-11
Posts: 41

Re: [SOLVED] openbox margins with dual monitors

Oh my god, i feel so idiotic, I had already tried adding those settings to my tint2rc file, but i didn't realize that at the last line it was being reset to strut_policy = minimum. erased that line and the behaviour worked like a charm.
thank you guys!

Offline

Board footer

Powered by FluxBB