Re: [dev] Re: DWM - Multiple screen not recognized in Virtualbox
Bryan Bennett <bbenne10 <at> gmail.com> writes:
>
> I apologize. I misread your initial mail. I remember having a similar
problem with virtual box but seem to remember that it was the result of a
mismatch between the guest additions and the virtualbox version rather than
being related to the wm. Are you sure your versions match?
I finally found my problem. It is located in the function "configurerequest"
in dwm.c. It's written "c->x = m->mx + ev->x;" and "c->y = m->my + ev->y;"
which means that the new coordinates are interpreted relatively to the
position of the monitor. Which is not the intended behavior. So I replace
those lines by "c->x = ev->x;" and "c->y = ev->y;" respectively. And it
works when I want to move a window to a monitor on the left. But, when I
want to move a window to a monitor on the right, it didn't work. I found few
lines below in dwm.c:
if((c->x + c->w) > m->mx + m->mw && c->isfloating)
c->x = m->mx + (m->mw / 2 - WIDTH(c) / 2); /* center in x direction */
if((c->y + c->h) > m->my + m->mh && c->isfloating)
c->y = m->my + (m->mh / 2 - HEIGHT(c) / 2); /* center in y direction */
which mean that when the window tries to go out of the screen on the right,
center it back. It's one more time not the intended behavior, so I comment
those lines. And it's know working like a charm. I suggest the maintainer to
update the code in dwm repository in order to fix this problem for the next
releases.
Received on Thu Jun 13 2013 - 11:48:59 CEST
This archive was generated by hypermail 2.3.0
: Thu Jun 13 2013 - 12:00:11 CEST