Adding dynamic padding patch - a variant of anysize that do not alter size hints ref. #168
This commit is contained in:
parent
3c7bcf616d
commit
9860867e10
3 changed files with 15 additions and 1 deletions
|
|
@ -154,6 +154,15 @@
|
||||||
*/
|
*/
|
||||||
#define DYNAMIC_CURSOR_COLOR_PATCH 0
|
#define DYNAMIC_CURSOR_COLOR_PATCH 0
|
||||||
|
|
||||||
|
/* This is a variant of the anysize patch that explicitly do not change the size increment hints,
|
||||||
|
* i.e. only keeping the dynamic padding which is the main thing the anysize patch introduces.
|
||||||
|
* In practice this means that the dynamic padding / anysize functionality only ever comes into
|
||||||
|
* effect when the size hints are intentionally ignored.
|
||||||
|
* An example of this would be dwm respecting the size hints of floating windows, but disrespecting
|
||||||
|
* the size hints when the window is tiled (provided that resizehints config is set to 0).
|
||||||
|
*/
|
||||||
|
#define DYNAMIC_PADDING_PATCH 0
|
||||||
|
|
||||||
/* Reading and writing st's screen through a pipe, e.g. pass info to dmenu.
|
/* Reading and writing st's screen through a pipe, e.g. pass info to dmenu.
|
||||||
* https://st.suckless.org/patches/externalpipe/
|
* https://st.suckless.org/patches/externalpipe/
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
5
st.h
5
st.h
|
|
@ -11,6 +11,11 @@
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#include "patches.h"
|
#include "patches.h"
|
||||||
|
|
||||||
|
#if DYNAMIC_PADDING_PATCH
|
||||||
|
#undef ANYSIZE_PATCH
|
||||||
|
#define ANYSIZE_PATCH 1
|
||||||
|
#endif // DYNAMIC_PADDING_PATCH
|
||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#define MAX(a, b) ((a) < (b) ? (b) : (a))
|
#define MAX(a, b) ((a) < (b) ? (b) : (a))
|
||||||
|
|
|
||||||
2
x.c
2
x.c
|
|
@ -1164,7 +1164,7 @@ xhints(void)
|
||||||
sizeh->flags = PSize | PResizeInc | PBaseSize | PMinSize;
|
sizeh->flags = PSize | PResizeInc | PBaseSize | PMinSize;
|
||||||
sizeh->height = win.h;
|
sizeh->height = win.h;
|
||||||
sizeh->width = win.w;
|
sizeh->width = win.w;
|
||||||
#if ANYSIZE_PATCH || ANYSIZE_SIMPLE_PATCH
|
#if ANYSIZE_PATCH && !DYNAMIC_PADDING_PATCH || ANYSIZE_SIMPLE_PATCH
|
||||||
sizeh->height_inc = 1;
|
sizeh->height_inc = 1;
|
||||||
sizeh->width_inc = 1;
|
sizeh->width_inc = 1;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue