aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2016-08-12 06:33:39 (GMT)
committerMathias Gumz <akira@fluxbox.org>2016-08-27 06:54:26 (GMT)
commit8d88d9be176f255bb85b13a9719145127273467c (patch)
tree6ac3f251ed8c77e86dc5fa85c86314e922af875a /src
parent3df681da2d274fa215ca98faa9507bcb5949ef52 (diff)
downloadfluxbox-8d88d9be176f255bb85b13a9719145127273467c.zip
fluxbox-8d88d9be176f255bb85b13a9719145127273467c.tar.bz2
add apps key to ignore XSizeHints
BUG: 1075
Diffstat (limited to 'src')
-rw-r--r--src/Remember.cc10
-rw-r--r--src/Remember.hh1
-rw-r--r--src/WinClient.cc4
3 files changed, 14 insertions, 1 deletions
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;