all repos — fluxbox @ 8d88d9be176f255bb85b13a9719145127273467c

custom fork of the fluxbox windowmanager

add apps key to ignore XSizeHints

BUG: 1075
Thomas Lübking thomas.luebking@gmail.com
commit

8d88d9be176f255bb85b13a9719145127273467c

parent

3df681da2d274fa215ca98faa9507bcb5949ef52

4 files changed, 21 insertions(+), 1 deletions(-)

jump to
M doc/asciidoc/fluxbox-apps.txtdoc/asciidoc/fluxbox-apps.txt

@@ -128,6 +128,13 @@ Opens the application with the specified 'width' and 'height', in pixels.

If the value is given in percent, then the window size will be based on the current screen's size. +*[IgnoreSizeHints]* {'bool'}:: + Some Applications restrict the aspect ratio, minimum or maximum size of + windows. Setting this key "yes" will make fluxbox ignore those constraints. + *NOTICE* that bad client implementations may hard depend on these + constraints (by blindly using their geometry in unsave calculations, causing + div-by-zero segfaults etc.) + *[Position]* ('anchor') {'X[%]' 'Y[%]'}:: Position the application at a particular spot. By default the upper-left corner is placed at screen coordinates ('X','Y'). If you specify an 'anchor', say
M src/Remember.ccsrc/Remember.cc

@@ -166,6 +166,8 @@ int w,h; // width, height

bool dimension_is_w_relative; bool dimension_is_h_relative; + bool ignoreSizeHints_remember; + bool position_remember; int x,y; bool position_is_x_relative;

@@ -497,6 +499,8 @@ h = FbTk::StringUtil::parseSizeToken(tokens[1], h_relative, ignore);

app.rememberDimensions(w, h, w_relative, h_relative); } else had_error = true; + } else if (str_key == "ignoresizehints") { + app.ignoreSizeHints_remember = str_label == "yes"; } else if (str_key == "position") { FluxboxWindow::ReferenceCorner r = FluxboxWindow::LEFTTOP; // more info about the parameter

@@ -1119,6 +1123,9 @@ break;

case REM_DIMENSIONS: return app->dimensions_remember; break; + case REM_IGNORE_SIZEHINTS: + return app->ignoreSizeHints_remember; + break; case REM_POSITION: return app->position_remember; break;

@@ -1264,6 +1271,9 @@ app->forgetHead();

break; case REM_DIMENSIONS: app->forgetDimensions(); + break; + case REM_IGNORE_SIZEHINTS: + app->ignoreSizeHints_remember = false; break; case REM_POSITION: app->forgetPosition();
M src/Remember.hhsrc/Remember.hh

@@ -75,6 +75,7 @@ REM_MINIMIZEDSTATE,

REM_MAXIMIZEDSTATE, REM_FULLSCREENSTATE, REM_FOCUSPROTECTION, + REM_IGNORE_SIZEHINTS, REM_LASTATTRIB // not actually used };
M src/WinClient.ccsrc/WinClient.cc

@@ -24,6 +24,7 @@

#include "Window.hh" #include "fluxbox.hh" #include "FocusControl.hh" +#include "Remember.hh" #include "Screen.hh" #include "FbAtoms.hh" #include "Xutil.hh"

@@ -427,7 +428,8 @@

void WinClient::updateWMNormalHints() { long icccm_mask; XSizeHints sizehint; - if (!XGetWMNormalHints(display(), window(), &sizehint, &icccm_mask)) + if (Remember::instance().isRemembered(*this, Remember::REM_IGNORE_SIZEHINTS) || + !XGetWMNormalHints(display(), window(), &sizehint, &icccm_mask)) sizehint.flags = 0; normal_hint_flags = sizehint.flags;