aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/asciidoc/fluxbox-apps.txt7
-rw-r--r--src/Remember.cc10
-rw-r--r--src/Remember.hh1
-rw-r--r--src/WinClient.cc4
4 files changed, 21 insertions, 1 deletions
diff --git a/doc/asciidoc/fluxbox-apps.txt b/doc/asciidoc/fluxbox-apps.txt
index 79c3710..428d0e2 100644
--- a/doc/asciidoc/fluxbox-apps.txt
+++ b/doc/asciidoc/fluxbox-apps.txt
@@ -128,6 +128,13 @@ respectively.
128 If the value is given in percent, then the window size will be based on 128 If the value is given in percent, then the window size will be based on
129 the current screen's size. 129 the current screen's size.
130 130
131*[IgnoreSizeHints]* {'bool'}::
132 Some Applications restrict the aspect ratio, minimum or maximum size of
133 windows. Setting this key "yes" will make fluxbox ignore those constraints.
134 *NOTICE* that bad client implementations may hard depend on these
135 constraints (by blindly using their geometry in unsave calculations, causing
136 div-by-zero segfaults etc.)
137
131*[Position]* ('anchor') {'X[%]' 'Y[%]'}:: 138*[Position]* ('anchor') {'X[%]' 'Y[%]'}::
132Position the application at a particular spot. By default the upper-left corner 139Position the application at a particular spot. By default the upper-left corner
133is placed at screen coordinates ('X','Y'). If you specify an 'anchor', say 140is placed at screen coordinates ('X','Y'). If you specify an 'anchor', say
diff --git a/src/Remember.cc b/src/Remember.cc
index 6545b50..49e6106 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -166,6 +166,8 @@ public:
166 bool dimension_is_w_relative; 166 bool dimension_is_w_relative;
167 bool dimension_is_h_relative; 167 bool dimension_is_h_relative;
168 168
169 bool ignoreSizeHints_remember;
170
169 bool position_remember; 171 bool position_remember;
170 int x,y; 172 int x,y;
171 bool position_is_x_relative; 173 bool position_is_x_relative;
@@ -497,6 +499,8 @@ int parseApp(ifstream &file, Application &app, string *first_line = 0) {
497 app.rememberDimensions(w, h, w_relative, h_relative); 499 app.rememberDimensions(w, h, w_relative, h_relative);
498 } else 500 } else
499 had_error = true; 501 had_error = true;
502 } else if (str_key == "ignoresizehints") {
503 app.ignoreSizeHints_remember = str_label == "yes";
500 } else if (str_key == "position") { 504 } else if (str_key == "position") {
501 FluxboxWindow::ReferenceCorner r = FluxboxWindow::LEFTTOP; 505 FluxboxWindow::ReferenceCorner r = FluxboxWindow::LEFTTOP;
502 // more info about the parameter 506 // more info about the parameter
@@ -1119,6 +1123,9 @@ bool Remember::isRemembered(WinClient &winclient, Attribute attrib) {
1119 case REM_DIMENSIONS: 1123 case REM_DIMENSIONS:
1120 return app->dimensions_remember; 1124 return app->dimensions_remember;
1121 break; 1125 break;
1126 case REM_IGNORE_SIZEHINTS:
1127 return app->ignoreSizeHints_remember;
1128 break;
1122 case REM_POSITION: 1129 case REM_POSITION:
1123 return app->position_remember; 1130 return app->position_remember;
1124 break; 1131 break;
@@ -1265,6 +1272,9 @@ void Remember::forgetAttrib(WinClient &winclient, Attribute attrib) {
1265 case REM_DIMENSIONS: 1272 case REM_DIMENSIONS:
1266 app->forgetDimensions(); 1273 app->forgetDimensions();
1267 break; 1274 break;
1275 case REM_IGNORE_SIZEHINTS:
1276 app->ignoreSizeHints_remember = false;
1277 break;
1268 case REM_POSITION: 1278 case REM_POSITION:
1269 app->forgetPosition(); 1279 app->forgetPosition();
1270 break; 1280 break;
diff --git a/src/Remember.hh b/src/Remember.hh
index fe33192..880fbe1 100644
--- a/src/Remember.hh
+++ b/src/Remember.hh
@@ -75,6 +75,7 @@ public:
75 REM_MAXIMIZEDSTATE, 75 REM_MAXIMIZEDSTATE,
76 REM_FULLSCREENSTATE, 76 REM_FULLSCREENSTATE,
77 REM_FOCUSPROTECTION, 77 REM_FOCUSPROTECTION,
78 REM_IGNORE_SIZEHINTS,
78 REM_LASTATTRIB // not actually used 79 REM_LASTATTRIB // not actually used
79 }; 80 };
80 81
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 22ee766..022a4ca 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -24,6 +24,7 @@
24#include "Window.hh" 24#include "Window.hh"
25#include "fluxbox.hh" 25#include "fluxbox.hh"
26#include "FocusControl.hh" 26#include "FocusControl.hh"
27#include "Remember.hh"
27#include "Screen.hh" 28#include "Screen.hh"
28#include "FbAtoms.hh" 29#include "FbAtoms.hh"
29#include "Xutil.hh" 30#include "Xutil.hh"
@@ -427,7 +428,8 @@ void WinClient::updateWMHints() {
427void WinClient::updateWMNormalHints() { 428void WinClient::updateWMNormalHints() {
428 long icccm_mask; 429 long icccm_mask;
429 XSizeHints sizehint; 430 XSizeHints sizehint;
430 if (!XGetWMNormalHints(display(), window(), &sizehint, &icccm_mask)) 431 if (Remember::instance().isRemembered(*this, Remember::REM_IGNORE_SIZEHINTS) ||
432 !XGetWMNormalHints(display(), window(), &sizehint, &icccm_mask))
431 sizehint.flags = 0; 433 sizehint.flags = 0;
432 434
433 normal_hint_flags = sizehint.flags; 435 normal_hint_flags = sizehint.flags;