mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Adding sendmoncenter patch ref. #402
This commit is contained in:
parent
03ede82d5c
commit
9869c22cb2
@ -19,6 +19,8 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
|
2023-12-01 - Added the sendmoncenter patch
|
||||||
|
|
||||||
2023-11-12 - Added the focusmaster-return patch variant
|
2023-11-12 - Added the focusmaster-return patch variant
|
||||||
|
|
||||||
2023-06-27 - Added the focusfollowmouse and unmanaged patches
|
2023-06-27 - Added the focusfollowmouse and unmanaged patches
|
||||||
@ -650,6 +652,9 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6
|
|||||||
- [selfrestart](https://dwm.suckless.org/patches/selfrestart/)
|
- [selfrestart](https://dwm.suckless.org/patches/selfrestart/)
|
||||||
- restart dwm without the unnecessary dependency of an external script
|
- restart dwm without the unnecessary dependency of an external script
|
||||||
|
|
||||||
|
- [sendmoncenter](https://dwm.suckless.org/patches/sendmoncenter/)
|
||||||
|
- floating windows being sent to another monitor will be centered
|
||||||
|
|
||||||
- [sendmon\_keepfocus](https://github.com/bakkeby/patches/wiki/sendmon_keepfocus/)
|
- [sendmon\_keepfocus](https://github.com/bakkeby/patches/wiki/sendmon_keepfocus/)
|
||||||
- minor patch that allow clients to keep focus when being sent to another monitor
|
- minor patch that allow clients to keep focus when being sent to another monitor
|
||||||
|
|
||||||
|
8
dwm.c
8
dwm.c
@ -3383,6 +3383,14 @@ sendmon(Client *c, Monitor *m)
|
|||||||
#else
|
#else
|
||||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||||
#endif // EMPTYVIEW_PATCH
|
#endif // EMPTYVIEW_PATCH
|
||||||
|
#if SENDMON_CENTER_PATCH
|
||||||
|
c->x = m->mx + (m->mw - WIDTH(c)) / 2;
|
||||||
|
c->y = m->my + (m->mh - HEIGHT(c)) / 2;
|
||||||
|
#if SAVEFLOATS_PATCH
|
||||||
|
c->sfx = m->mx + (m->mw - c->sfw - 2 * c->bw) / 2;
|
||||||
|
c->sfy = m->my + (m->mh - c->sfh - 2 * c->bw) / 2;
|
||||||
|
#endif // SAVEFLOATS_PATCH
|
||||||
|
#endif // SENDMON_CENTER_PATCH
|
||||||
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
|
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
|
||||||
attachx(c);
|
attachx(c);
|
||||||
#else
|
#else
|
||||||
|
@ -1028,6 +1028,11 @@
|
|||||||
*/
|
*/
|
||||||
#define SELFRESTART_PATCH 0
|
#define SELFRESTART_PATCH 0
|
||||||
|
|
||||||
|
/* Floating windows being sent to another monitor will be centered.
|
||||||
|
* https://dwm.suckless.org/patches/sendmoncenter/
|
||||||
|
*/
|
||||||
|
#define SENDMON_CENTER_PATCH 0
|
||||||
|
|
||||||
/* This patch allow clients to keep focus when being sent to another monitor.
|
/* This patch allow clients to keep focus when being sent to another monitor.
|
||||||
* https://github.com/bakkeby/patches/blob/master/dwm/dwm-sendmon_keepfocus-6.2.diff
|
* https://github.com/bakkeby/patches/blob/master/dwm/dwm-sendmon_keepfocus-6.2.diff
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user