This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit c6c50703118ed77ed3eef5238c9c6ff655784e24
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sun Sep 10 16:21:49 2023 +0200
Optionally ignore gravity from WM_NORMAL_HINTS
---
docs/e16.asc | 2 ++
src/E.h | 3 ++-
src/ewins.c | 7 ++++++-
src/mod-misc.c | 3 ++-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/docs/e16.asc b/docs/e16.asc
index ba1f3f00..9d189402 100644
--- a/docs/e16.asc
+++ b/docs/e16.asc
@@ -1053,6 +1053,8 @@ misc.place.ignore_struts = 0
misc.place.ignore_struts_fullscreen = 0
# [bool] Ignore struts when maximizing windows
misc.place.ignore_struts_maximize = 0
+# [bool] Ignore WM_NORMAL_HINTS gravity setting
+misc.place.ignore_client_gravity = 0
# [int] Screen struts - strips at screen edge to avoid when placing windows
misc.place.screen_struts.left = 0
misc.place.screen_struts.right = 0
diff --git a/src/E.h b/src/E.h
index e47ce7c9..f045e9e3 100644
--- a/src/E.h
+++ b/src/E.h
@@ -3,7 +3,7 @@
/*****************************************************************************/
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -245,6 +245,7 @@ typedef struct {
char ignore_struts;
char ignore_struts_fullscreen;
char ignore_struts_maximize;
+ char ignore_client_gravity;
char raise_fullscreen;
char slidein;
char cleanupslide;
diff --git a/src/ewins.c b/src/ewins.c
index ccb25807..ebb6fd12 100644
--- a/src/ewins.c
+++ b/src/ewins.c
@@ -315,7 +315,12 @@ EwinSetGeometry(EWin * ewin)
int grav;
const EImageBorder *pad;
- grav = (ewin->state.identified) ? StaticGravity : ewin->icccm.grav;
+ if (ewin->state.identified)
+ grav = StaticGravity;
+ else if (Conf.place.ignore_client_gravity)
+ grav = NorthWestGravity;
+ else
+ grav = ewin->icccm.grav;
EwinGetPosition(ewin, ewin->client.x, ewin->client.y, grav, &x, &y);
diff --git a/src/mod-misc.c b/src/mod-misc.c
index ab4c3c0e..1edb07aa 100644
--- a/src/mod-misc.c
+++ b/src/mod-misc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2022 Kim Woelders
+ * Copyright (C) 2003-2023 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -179,6 +179,7 @@ static const CfgItem MiscCfgItems[] = {
CFG_ITEM_BOOL(Conf, place.ignore_struts, 0),
CFG_ITEM_BOOL(Conf, place.ignore_struts_fullscreen, 0),
CFG_ITEM_BOOL(Conf, place.ignore_struts_maximize, 0),
+ CFG_ITEM_BOOL(Conf, place.ignore_client_gravity, 0),
CFG_ITEM_INT(Conf, place.screen_struts.left, 0),
CFG_ITEM_INT(Conf, place.screen_struts.right, 0),
CFG_ITEM_INT(Conf, place.screen_struts.top, 0),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.