diff options
| author | bakkeby <[email protected]> | 2020-10-06 08:45:17 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-10-06 08:45:17 +0200 |
| commit | 56c81ddbfa8f133d6690977f6ea01d16185538a2 (patch) | |
| tree | ac1b2fe3f52b7f1b5bd12eab94a699f325fec837 /dwm.c | |
| parent | c47f61387da7c85aff9d3db00081053965e2e0dc (diff) | |
| download | dwm-flexipatch-56c81ddbfa8f133d6690977f6ea01d16185538a2.tar.gz dwm-flexipatch-56c81ddbfa8f133d6690977f6ea01d16185538a2.zip | |
warp: dragmfact + dragcfact compatibility
These set of changes introduce:
a) a flag to ignore warp from happening while dragmfact or
dragcfact is being used and
b) a flag to force warp when killclient or showhideclient
is used, to make for a more intuitive experience
ref. https://github.com/bakkeby/patches/issues/11
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -671,6 +671,10 @@ static int lrpad; /* sum of left and right padding for text */ * when moving (or resizing) client windows from one monitor to another. This variable is used * internally to ignore such configure requests while movemouse or resizemouse are being used. */ static int ignoreconfigurerequests = 0; +#if WARP_PATCH +static int force_warp = 0; // force warp in some situations, e.g. killclient +static int ignore_warp = 0; // force skip warp in some situations, e.g. dragmfact, dragcfact +#endif // WARP_PATCH static int (*xerrorxlib)(Display *, XErrorEvent *); static unsigned int numlockmask = 0; static void (*handler[LASTEvent]) (XEvent *) = { @@ -2112,10 +2116,11 @@ killclient(const Arg *arg) #endif // ISPERMANENT_PATCH return; #if BAR_SYSTRAY_PATCH - if (!sendevent(selmon->sel->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0, 0, 0)) { + if (!sendevent(selmon->sel->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0, 0, 0)) #else - if (!sendevent(selmon->sel, wmatom[WMDelete])) { + if (!sendevent(selmon->sel, wmatom[WMDelete])) #endif // BAR_SYSTRAY_PATCH + { XGrabServer(dpy); XSetErrorHandler(xerrordummy); XSetCloseDownMode(dpy, DestroyAll); @@ -2123,6 +2128,9 @@ killclient(const Arg *arg) XSync(dpy, False); XSetErrorHandler(xerror); XUngrabServer(dpy); + #if WARP_PATCH + force_warp = 1; + #endif // WARP_PATCH } #if SWAPFOCUS_PATCH && PERTAG_PATCH selmon->pertag->prevclient[selmon->pertag->curtag] = NULL; |
