add apps key to ignore XSizeHints
BUG: 1075
This commit is contained in:
parent
3df681da2d
commit
8d88d9be17
4 changed files with 21 additions and 1 deletions
|
@ -128,6 +128,13 @@ respectively.
|
||||||
If the value is given in percent, then the window size will be based on
|
If the value is given in percent, then the window size will be based on
|
||||||
the current screen's size.
|
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]* ('anchor') {'X[%]' 'Y[%]'}::
|
||||||
Position the application at a particular spot. By default the upper-left corner
|
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
|
is placed at screen coordinates ('X','Y'). If you specify an 'anchor', say
|
||||||
|
|
|
@ -166,6 +166,8 @@ public:
|
||||||
bool dimension_is_w_relative;
|
bool dimension_is_w_relative;
|
||||||
bool dimension_is_h_relative;
|
bool dimension_is_h_relative;
|
||||||
|
|
||||||
|
bool ignoreSizeHints_remember;
|
||||||
|
|
||||||
bool position_remember;
|
bool position_remember;
|
||||||
int x,y;
|
int x,y;
|
||||||
bool position_is_x_relative;
|
bool position_is_x_relative;
|
||||||
|
@ -497,6 +499,8 @@ int parseApp(ifstream &file, Application &app, string *first_line = 0) {
|
||||||
app.rememberDimensions(w, h, w_relative, h_relative);
|
app.rememberDimensions(w, h, w_relative, h_relative);
|
||||||
} else
|
} else
|
||||||
had_error = true;
|
had_error = true;
|
||||||
|
} else if (str_key == "ignoresizehints") {
|
||||||
|
app.ignoreSizeHints_remember = str_label == "yes";
|
||||||
} else if (str_key == "position") {
|
} else if (str_key == "position") {
|
||||||
FluxboxWindow::ReferenceCorner r = FluxboxWindow::LEFTTOP;
|
FluxboxWindow::ReferenceCorner r = FluxboxWindow::LEFTTOP;
|
||||||
// more info about the parameter
|
// more info about the parameter
|
||||||
|
@ -1119,6 +1123,9 @@ bool Remember::isRemembered(WinClient &winclient, Attribute attrib) {
|
||||||
case REM_DIMENSIONS:
|
case REM_DIMENSIONS:
|
||||||
return app->dimensions_remember;
|
return app->dimensions_remember;
|
||||||
break;
|
break;
|
||||||
|
case REM_IGNORE_SIZEHINTS:
|
||||||
|
return app->ignoreSizeHints_remember;
|
||||||
|
break;
|
||||||
case REM_POSITION:
|
case REM_POSITION:
|
||||||
return app->position_remember;
|
return app->position_remember;
|
||||||
break;
|
break;
|
||||||
|
@ -1265,6 +1272,9 @@ void Remember::forgetAttrib(WinClient &winclient, Attribute attrib) {
|
||||||
case REM_DIMENSIONS:
|
case REM_DIMENSIONS:
|
||||||
app->forgetDimensions();
|
app->forgetDimensions();
|
||||||
break;
|
break;
|
||||||
|
case REM_IGNORE_SIZEHINTS:
|
||||||
|
app->ignoreSizeHints_remember = false;
|
||||||
|
break;
|
||||||
case REM_POSITION:
|
case REM_POSITION:
|
||||||
app->forgetPosition();
|
app->forgetPosition();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -75,6 +75,7 @@ public:
|
||||||
REM_MAXIMIZEDSTATE,
|
REM_MAXIMIZEDSTATE,
|
||||||
REM_FULLSCREENSTATE,
|
REM_FULLSCREENSTATE,
|
||||||
REM_FOCUSPROTECTION,
|
REM_FOCUSPROTECTION,
|
||||||
|
REM_IGNORE_SIZEHINTS,
|
||||||
REM_LASTATTRIB // not actually used
|
REM_LASTATTRIB // not actually used
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "Window.hh"
|
#include "Window.hh"
|
||||||
#include "fluxbox.hh"
|
#include "fluxbox.hh"
|
||||||
#include "FocusControl.hh"
|
#include "FocusControl.hh"
|
||||||
|
#include "Remember.hh"
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "FbAtoms.hh"
|
#include "FbAtoms.hh"
|
||||||
#include "Xutil.hh"
|
#include "Xutil.hh"
|
||||||
|
@ -427,7 +428,8 @@ void WinClient::updateWMHints() {
|
||||||
void WinClient::updateWMNormalHints() {
|
void WinClient::updateWMNormalHints() {
|
||||||
long icccm_mask;
|
long icccm_mask;
|
||||||
XSizeHints sizehint;
|
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;
|
sizehint.flags = 0;
|
||||||
|
|
||||||
normal_hint_flags = sizehint.flags;
|
normal_hint_flags = sizehint.flags;
|
||||||
|
|
Loading…
Reference in a new issue