diff --git a/README.md b/README.md index 7cfdc2d..76b703a 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t ### Changelog: -2021-03-09 - Added the tab patch +2021-03-09 - Added the tab patch and the LG3D patch 2021-02-11 - Added the riodraw and focusdir patches @@ -400,6 +400,10 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t - [~leftlayout~](http://dwm.suckless.org/patches/leftlayout/) - ~moves the layout symbol in the status bar to the left hand side~ + - LG3D + - changes the window manager name to "LG3d" instead of "dwm" as a workaround for Java applications that assume that the window manager is using window reparenting + - refer to the ISSUES secton of the dwm man page for more details + - [losefullscreen](https://github.com/bakkeby/patches/wiki/losefullscreen/) - by default in dwm it is possible to make an application fullscreen, then use the focusstack keybindings to focus on other windows beneath the current window - it is also possible to spawn new windows (e.g. a terminal) that end up getting focus while the previous window remains in fullscreen diff --git a/dwm.c b/dwm.c index 9cabc5b..d6a2f10 100644 --- a/dwm.c +++ b/dwm.c @@ -1020,7 +1020,10 @@ attachstack(Client *c) void buttonpress(XEvent *e) { - int click, i, x, r; + int click, i, r; + #if TAB_PATCH + int x; + #endif // TAB_PATCH Arg arg = {0}; Client *c; Monitor *m; @@ -3518,8 +3521,13 @@ setup(void) wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0); XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32, PropModeReplace, (unsigned char *) &wmcheckwin, 1); + #if LG3D_PATCH + XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8, + PropModeReplace, (unsigned char *) "LG3D", 4); + #else XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8, PropModeReplace, (unsigned char *) "dwm", 3); + #endif // LG3D_PATCH XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32, PropModeReplace, (unsigned char *) &wmcheckwin, 1); /* EWMH support per view */ diff --git a/patches.def.h b/patches.def.h index ef1a0d6..f0e1e4b 100644 --- a/patches.def.h +++ b/patches.def.h @@ -603,6 +603,12 @@ */ #define KILLUNSEL_PATCH 0 +/* This changes the window manager name to LG3d instead of dwm as a workaround for Java + * applications that assume that the window manager is using window reparenting. + * Refer to the ISSUES secton of the dwm man page for more details. + */ +#define LG3D_PATCH 0 + /* By default in dwm it is possible to make an application fullscreen, then use * the focusstack keybindings to focus on other windows beneath the current window. * It is also possible to spawn new windows (e.g. a terminal) that end up getting