mirror of
https://git.suckless.org/dwm
synced 2024-12-27 03:16:32 +00:00
updategeom fix for same geom screens
This commit is contained in:
parent
dc39ae8568
commit
c13be8d620
2 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
# dwm version
|
# dwm version
|
||||||
VERSION = 5.7
|
VERSION = 5.6.1
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
|
7
dwm.c
7
dwm.c
|
@ -1683,7 +1683,7 @@ updatebarpos(Monitor *m) {
|
||||||
|
|
||||||
void
|
void
|
||||||
updategeom(void) {
|
updategeom(void) {
|
||||||
int i, n = 1;
|
int i, n = 1, nn;
|
||||||
Client *c;
|
Client *c;
|
||||||
Monitor *newmons = NULL, *m = NULL, *tm;
|
Monitor *newmons = NULL, *m = NULL, *tm;
|
||||||
|
|
||||||
|
@ -1692,6 +1692,11 @@ updategeom(void) {
|
||||||
|
|
||||||
if(XineramaIsActive(dpy))
|
if(XineramaIsActive(dpy))
|
||||||
info = XineramaQueryScreens(dpy, &n);
|
info = XineramaQueryScreens(dpy, &n);
|
||||||
|
for(i = 1, nn = n; i < n; i++)
|
||||||
|
if(info[i - 1].x_org == info[i].x_org && info[i - 1].y_org == info[i].y_org
|
||||||
|
&& info[i - 1].width == info[i].width && info[i - 1].height == info[i].height)
|
||||||
|
--nn;
|
||||||
|
n = nn; /* we only consider unique geometrys as separate screens */
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
/* allocate monitor(s) for the new geometry setup */
|
/* allocate monitor(s) for the new geometry setup */
|
||||||
for(i = 0; i < n; i++) {
|
for(i = 0; i < n; i++) {
|
||||||
|
|
Loading…
Reference in a new issue