mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
scratchtags: allow moving / resizing scratchtag window to another monitor + minor comment
This commit is contained in:
parent
fada5790a2
commit
32f9a73c0d
17
dwm.c
17
dwm.c
@ -2363,6 +2363,12 @@ movemouse(const Arg *arg)
|
|||||||
} while (ev.type != ButtonRelease);
|
} while (ev.type != ButtonRelease);
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
||||||
|
#if SCRATCHPADS_PATCH
|
||||||
|
if (c->tags & SPTAGMASK) {
|
||||||
|
c->mon->tagset[c->mon->seltags] ^= (c->tags & SPTAGMASK);
|
||||||
|
m->tagset[m->seltags] |= (c->tags & SPTAGMASK);
|
||||||
|
}
|
||||||
|
#endif // SCRATCHPADS_PATCH
|
||||||
sendmon(c, m);
|
sendmon(c, m);
|
||||||
selmon = m;
|
selmon = m;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
@ -2554,6 +2560,11 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
|||||||
configure(c);
|
configure(c);
|
||||||
#if FAKEFULLSCREEN_CLIENT_PATCH
|
#if FAKEFULLSCREEN_CLIENT_PATCH
|
||||||
if (c->fakefullscreen == 1)
|
if (c->fakefullscreen == 1)
|
||||||
|
/* Exception: if the client was in actual fullscreen and we exit out to fake fullscreen
|
||||||
|
* mode, then the focus would drift to whichever window is under the mouse cursor at the
|
||||||
|
* time. To avoid this we pass True to XSync which will make the X server disregard any
|
||||||
|
* other events in the queue thus cancelling the EnterNotify event that would otherwise
|
||||||
|
* have changed focus. */
|
||||||
XSync(dpy, True);
|
XSync(dpy, True);
|
||||||
else
|
else
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
@ -2689,6 +2700,12 @@ resizemouse(const Arg *arg)
|
|||||||
XUngrabPointer(dpy, CurrentTime);
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
||||||
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
||||||
|
#if SCRATCHPADS_PATCH
|
||||||
|
if (c->tags & SPTAGMASK) {
|
||||||
|
c->mon->tagset[c->mon->seltags] ^= (c->tags & SPTAGMASK);
|
||||||
|
m->tagset[m->seltags] |= (c->tags & SPTAGMASK);
|
||||||
|
}
|
||||||
|
#endif // SCRATCHPADS_PATCH
|
||||||
sendmon(c, m);
|
sendmon(c, m);
|
||||||
selmon = m;
|
selmon = m;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user