forked from e16/e16
1
0
Fork 0

Optionally ignore gravity from WM_NORMAL_HINTS

This commit is contained in:
Kim Woelders 2023-09-10 16:21:49 +02:00
parent e598ae60a5
commit c6c5070311
4 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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),