Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

dwm and multiple Screens

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

dwm and multiple Screens

#1 Post by DebbyIan »

dwm multi-monitor doesn't work correctly if I have two screen setup on a single X server. This is vanilla dwm compiled with the default Xinerama option enabled. Namely, the opposite of Xorg Xinerama.

I have two screens, Screen0 and Screen1. Screen0 is connected to two displays. dwm on Screen0 is stretched across both the displays. Flaw!

OTOH if I have two X servers, X0 and X1 each with Screen0, ie. :0.0 and :1.0 then dwm honours its anti-Xinerama feature and correctly shows a single monitor on each of the two displays.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: dwm and multiple Screens

#2 Post by Head_on_a_Stick »

Have you seen http://dwm.suckless.org/multi-monitor?

I've never owned a monitor so I probably can't help directly but it is always better to post the full content of any configuration files rather than a vague description :wink:
deadbang

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: dwm and multiple Screens

#3 Post by DebbyIan »

You haven't understood the problem because you haven't read the post properly. Stop judging this as vague. It has been deliberately been made succinct to stop people like you taking the post in another direction. Did you read the post? If you haven't then which config files do you think you want to see?

The problem is quite clearly described. This is not any answer:

http://dwm.suckless.org/multi-monitor

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: dwm and multiple Screens

#4 Post by DebbyIan »

DebbyIan wrote:dwm multi-monitor doesn't work correctly if I have two screen setup on a single X server. This is vanilla dwm compiled with the default Xinerama option enabled. Namely, the opposite of Xorg Xinerama.

I have two screens, Screen0 and Screen1. Screen0 is connected to two displays. dwm on Screen0 is stretched across both the displays. Flaw!

OTOH if I have two X servers, X0 and X1 each with Screen0, ie. :0.0 and :1.0 then dwm honours its anti-Xinerama feature and correctly shows a single monitor on each of the two displays.
NB. The issue only arises if you have a second screen (ie, :0.1) configured in Xorg. Regardless of whether :0.1 is being used or not. Most people set up multiple displays on a single screen (:0.0) and then use xrandr to configure the displays that way. In these cases dwm's anti-Xinerama works correctly.

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: dwm and multiple Screens

#5 Post by DebbyIan »

There is clearly a small flaw in dwm's Xinerama implementation. Second, I believe it would be less confusing if Xinerama on was switched around with Xinerama off in keeping with Xorg's Xinerama. Essentially Xinerama on means span an application's display over several Screens or monitors. Xinerama off should mean, restrict an application's display to a single Screen or monitor that it's running on. At the moment you have to compile dwm with Xinerama libraries enabled in order to get a non-Xinerama effect.

So in addressing the earlier issue I have instead elected to setup several Screens (Screen0, Screen1) instead, and am running one instance of dwm on each Screen, :0.0 and :0.1. But there another flaw (again in dwm). When the pointer is moved to another Screen the keyboard focus does not automatically translate to the new Screen. I therefore propose an update to the function enternotify(XEvent *) such that:

Code: Select all

void
enternotify(XEvent *e)
{
	Client *c;
	Monitor *m;
	XCrossingEvent *ev = &e->xcrossing;

	if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
		return;
	c = wintoclient(ev->window);
	m = c ? c->mon : wintomon(ev->window);
	if (m != selmon) {
		unfocus(selmon->sel, 1);
		selmon = m;
+      }
-	} else if (!c || c == selmon->sel)
-		return;
	focus(c);
}

Post Reply