aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-15 11:36:02 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-15 11:36:02 (GMT)
commit4093d2641f371bb8e80616a4c51dea9af508dac2 (patch)
treeee55897193105bfe0dca0b9dd771af7f6cf06d19 /src
parentf32fdc29d28dce26f87e9f10f32e9399686766d8 (diff)
downloadfluxbox_paul-4093d2641f371bb8e80616a4c51dea9af508dac2.zip
fluxbox_paul-4093d2641f371bb8e80616a4c51dea9af508dac2.tar.bz2
group some window properties into a new class FbWinFrame::State
Diffstat (limited to 'src')
-rw-r--r--src/FbWinFrame.cc59
-rw-r--r--src/FbWinFrame.hh59
-rw-r--r--src/Window.cc4
3 files changed, 68 insertions, 54 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 9136d20..3a3dc86 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -78,11 +78,9 @@ FbWinFrame::FbWinFrame(BScreen &screen,
78 ButtonMotionMask | ExposureMask | 78 ButtonMotionMask | ExposureMask |
79 EnterWindowMask | LeaveWindowMask), 79 EnterWindowMask | LeaveWindowMask),
80 m_bevel(1), 80 m_bevel(1),
81 m_decoration_mask(DECOR_NORMAL),
82 m_use_titlebar(true), 81 m_use_titlebar(true),
83 m_use_tabs(true), 82 m_use_tabs(true),
84 m_use_handle(true), 83 m_use_handle(true),
85 m_focused(false),
86 m_visible(false), 84 m_visible(false),
87 m_button_pm(0), 85 m_button_pm(0),
88 m_tabmode(screen.getDefaultInternalTabs()?INTERNAL:EXTERNAL), 86 m_tabmode(screen.getDefaultInternalTabs()?INTERNAL:EXTERNAL),
@@ -91,7 +89,6 @@ FbWinFrame::FbWinFrame(BScreen &screen,
91 m_need_render(true), 89 m_need_render(true),
92 m_button_size(1), 90 m_button_size(1),
93 m_height_before_shade(1), 91 m_height_before_shade(1),
94 m_shaded(false),
95 m_focused_alpha(AlphaAcc(*theme.focusedTheme(), &FbWinFrameTheme::alpha)), 92 m_focused_alpha(AlphaAcc(*theme.focusedTheme(), &FbWinFrameTheme::alpha)),
96 m_unfocused_alpha(AlphaAcc(*theme.unfocusedTheme(), &FbWinFrameTheme::alpha)), 93 m_unfocused_alpha(AlphaAcc(*theme.unfocusedTheme(), &FbWinFrameTheme::alpha)),
97 m_shape(m_window, theme->shapePlace()), 94 m_shape(m_window, theme->shapePlace()),
@@ -203,8 +200,8 @@ void FbWinFrame::shade() {
203 return; 200 return;
204 201
205 // toggle shade 202 // toggle shade
206 m_shaded = !m_shaded; 203 m_state.shaded = !m_state.shaded;
207 if (m_shaded) { // i.e. should be shaded now 204 if (m_state.shaded) { // i.e. should be shaded now
208 m_height_before_shade = m_window.height(); 205 m_height_before_shade = m_window.height();
209 m_window.resize(m_window.width(), m_titlebar.height()); 206 m_window.resize(m_window.width(), m_titlebar.height());
210 alignTabs(); 207 alignTabs();
@@ -250,7 +247,7 @@ void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int heigh
250 if (move && x == window().x() && y == window().y()) 247 if (move && x == window().x() && y == window().y())
251 move = false; 248 move = false;
252 249
253 if (resize && (m_shaded || width == FbWinFrame::width() && 250 if (resize && (m_state.shaded || width == FbWinFrame::width() &&
254 height == FbWinFrame::height())) 251 height == FbWinFrame::height()))
255 resize = false; 252 resize = false;
256 253
@@ -412,7 +409,7 @@ void FbWinFrame::alignTabs() {
412 409
413void FbWinFrame::notifyMoved(bool clear) { 410void FbWinFrame::notifyMoved(bool clear) {
414 // not important if no alpha... 411 // not important if no alpha...
415 unsigned char alpha = getAlpha(m_focused); 412 unsigned char alpha = getAlpha(m_state.focused);
416 if (alpha == 255) 413 if (alpha == 255)
417 return; 414 return;
418 415
@@ -469,14 +466,14 @@ void FbWinFrame::clearAll() {
469} 466}
470 467
471void FbWinFrame::setFocus(bool newvalue) { 468void FbWinFrame::setFocus(bool newvalue) {
472 if (m_focused == newvalue) 469 if (m_state.focused == newvalue)
473 return; 470 return;
474 471
475 m_focused = newvalue; 472 m_state.focused = newvalue;
476 473
477 if (FbTk::Transparent::haveRender() && 474 if (FbTk::Transparent::haveRender() &&
478 getAlpha(true) != getAlpha(false)) { // different alpha for focused and unfocused 475 getAlpha(true) != getAlpha(false)) { // different alpha for focused and unfocused
479 unsigned char alpha = getAlpha(m_focused); 476 unsigned char alpha = getAlpha(m_state.focused);
480 if (FbTk::Transparent::haveComposite()) { 477 if (FbTk::Transparent::haveComposite()) {
481 m_tab_container.setAlpha(255); 478 m_tab_container.setAlpha(255);
482 m_window.setOpaque(alpha); 479 m_window.setOpaque(alpha);
@@ -498,12 +495,12 @@ void FbWinFrame::setAlpha(bool focused, unsigned char alpha) {
498 else 495 else
499 m_unfocused_alpha = alpha; 496 m_unfocused_alpha = alpha;
500 497
501 if (m_focused == focused) 498 if (m_state.focused == focused)
502 applyAlpha(); 499 applyAlpha();
503} 500}
504 501
505void FbWinFrame::applyAlpha() { 502void FbWinFrame::applyAlpha() {
506 unsigned char alpha = getAlpha(m_focused); 503 unsigned char alpha = getAlpha(m_state.focused);
507 if (FbTk::Transparent::haveComposite()) 504 if (FbTk::Transparent::haveComposite())
508 m_window.setOpaque(alpha); 505 m_window.setOpaque(alpha);
509 else { 506 else {
@@ -845,7 +842,7 @@ void FbWinFrame::reconfigure() {
845 m_bevel = theme()->bevelWidth(); 842 m_bevel = theme()->bevelWidth();
846 setBorderWidth(); 843 setBorderWidth();
847 844
848 if (m_decoration_mask & DECORM_HANDLE && theme()->handleWidth() != 0) 845 if (m_state.deco_mask & DECORM_HANDLE && theme()->handleWidth() != 0)
849 showHandle(); 846 showHandle();
850 else 847 else
851 hideHandle(); 848 hideHandle();
@@ -889,7 +886,7 @@ void FbWinFrame::reconfigure() {
889 } 886 }
890 887
891 // leave client+grips alone if we're shaded (it'll get fixed when we unshade) 888 // leave client+grips alone if we're shaded (it'll get fixed when we unshade)
892 if (!m_shaded) { 889 if (!m_state.shaded) {
893 int client_top = 0; 890 int client_top = 0;
894 int client_height = m_window.height(); 891 int client_height = m_window.height();
895 if (m_use_titlebar) { 892 if (m_use_titlebar) {
@@ -945,7 +942,7 @@ void FbWinFrame::reconfigure() {
945 // update transparency settings 942 // update transparency settings
946 if (FbTk::Transparent::haveRender()) { 943 if (FbTk::Transparent::haveRender()) {
947 unsigned char alpha = 944 unsigned char alpha =
948 getAlpha(m_focused); 945 getAlpha(m_state.focused);
949 if (FbTk::Transparent::haveComposite()) { 946 if (FbTk::Transparent::haveComposite()) {
950 m_tab_container.setAlpha(255); 947 m_tab_container.setAlpha(255);
951 m_window.setOpaque(alpha); 948 m_window.setOpaque(alpha);
@@ -1160,7 +1157,7 @@ void FbWinFrame::applyTitlebar() {
1160 getCurrentFocusPixmap(label_pm, title_pm, 1157 getCurrentFocusPixmap(label_pm, title_pm,
1161 label_color, title_color); 1158 label_color, title_color);
1162 1159
1163 unsigned char alpha = getAlpha (m_focused); 1160 unsigned char alpha = getAlpha (m_state.focused);
1164 m_titlebar.setAlpha(alpha); 1161 m_titlebar.setAlpha(alpha);
1165 m_label.setAlpha(alpha); 1162 m_label.setAlpha(alpha);
1166 1163
@@ -1212,12 +1209,12 @@ void FbWinFrame::renderHandles() {
1212 1209
1213void FbWinFrame::applyHandles() { 1210void FbWinFrame::applyHandles() {
1214 1211
1215 unsigned char alpha = getAlpha (m_focused); 1212 unsigned char alpha = getAlpha(m_state.focused);
1216 m_handle.setAlpha(alpha); 1213 m_handle.setAlpha(alpha);
1217 m_grip_left.setAlpha(alpha); 1214 m_grip_left.setAlpha(alpha);
1218 m_grip_right.setAlpha(alpha); 1215 m_grip_right.setAlpha(alpha);
1219 1216
1220 if (m_focused) { 1217 if (m_state.focused) {
1221 1218
1222 if (m_handle_focused_pm) { 1219 if (m_handle_focused_pm) {
1223 m_handle.setBackgroundPixmap(m_handle_focused_pm); 1220 m_handle.setBackgroundPixmap(m_handle_focused_pm);
@@ -1302,7 +1299,7 @@ void FbWinFrame::init() {
1302 1299
1303 m_clientarea.setBorderWidth(0); 1300 m_clientarea.setBorderWidth(0);
1304 m_label.setBorderWidth(0); 1301 m_label.setBorderWidth(0);
1305 m_shaded = false; 1302 m_state.shaded = false;
1306 1303
1307 setTabMode(NOTSET); 1304 setTabMode(NOTSET);
1308 1305
@@ -1327,13 +1324,13 @@ void FbWinFrame::applyButton(FbTk::Button &btn) {
1327 else 1324 else
1328 btn.setPressedColor(m_button_pressed_color); 1325 btn.setPressedColor(m_button_pressed_color);
1329 1326
1330 Pixmap pm = m_focused ? m_button_pm : m_button_unfocused_pm; 1327 Pixmap pm = m_state.focused ? m_button_pm : m_button_unfocused_pm;
1331 btn.setAlpha(getAlpha(m_focused)); 1328 btn.setAlpha(getAlpha(m_state.focused));
1332 btn.setGC(theme()->buttonPicGC()); 1329 btn.setGC(theme()->buttonPicGC());
1333 if (pm) 1330 if (pm)
1334 btn.setBackgroundPixmap(pm); 1331 btn.setBackgroundPixmap(pm);
1335 else 1332 else
1336 btn.setBackgroundColor(m_focused ? m_button_color 1333 btn.setBackgroundColor(m_state.focused ? m_button_color
1337 : m_button_unfocused_color); 1334 : m_button_unfocused_color);
1338} 1335}
1339 1336
@@ -1355,7 +1352,7 @@ void FbWinFrame::render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm,
1355 1352
1356void FbWinFrame::getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, 1353void FbWinFrame::getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
1357 FbTk::Color &label_color, FbTk::Color &title_color) { 1354 FbTk::Color &label_color, FbTk::Color &title_color) {
1358 if (m_focused) { 1355 if (m_state.focused) {
1359 if (m_label_focused_pm != 0) 1356 if (m_label_focused_pm != 0)
1360 label_pm = m_label_focused_pm; 1357 label_pm = m_label_focused_pm;
1361 else 1358 else
@@ -1379,12 +1376,12 @@ void FbWinFrame::getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
1379} 1376}
1380 1377
1381void FbWinFrame::applyTabContainer() { 1378void FbWinFrame::applyTabContainer() {
1382 m_tab_container.setAlpha(getAlpha(m_focused)); 1379 m_tab_container.setAlpha(getAlpha(m_state.focused));
1383 1380
1384 // do the parent container 1381 // do the parent container
1385 Pixmap tabcontainer_pm = None; 1382 Pixmap tabcontainer_pm = None;
1386 FbTk::Color *tabcontainer_color = NULL; 1383 FbTk::Color *tabcontainer_color = NULL;
1387 if (m_focused) { 1384 if (m_state.focused) {
1388 if (m_tabcontainer_focused_pm != 0) 1385 if (m_tabcontainer_focused_pm != 0)
1389 tabcontainer_pm = m_tabcontainer_focused_pm; 1386 tabcontainer_pm = m_tabcontainer_focused_pm;
1390 else 1387 else
@@ -1421,13 +1418,13 @@ void FbWinFrame::applyDecorations() {
1421 // tab deocration only affects if we're external 1418 // tab deocration only affects if we're external
1422 // must do before the setTabMode in case it goes 1419 // must do before the setTabMode in case it goes
1423 // to external and is meant to be hidden 1420 // to external and is meant to be hidden
1424 if (m_decoration_mask & DECORM_TAB) 1421 if (m_state.deco_mask & DECORM_TAB)
1425 client_move |= showTabs(); 1422 client_move |= showTabs();
1426 else 1423 else
1427 client_move |= hideTabs(); 1424 client_move |= hideTabs();
1428 1425
1429 // we rely on frame not doing anything if it is already shown/hidden 1426 // we rely on frame not doing anything if it is already shown/hidden
1430 if (m_decoration_mask & DECORM_TITLEBAR) { 1427 if (m_state.deco_mask & DECORM_TITLEBAR) {
1431 client_move |= showTitlebar(); 1428 client_move |= showTitlebar();
1432 if (m_screen.getDefaultInternalTabs()) 1429 if (m_screen.getDefaultInternalTabs())
1433 client_move |= setTabMode(INTERNAL); 1430 client_move |= setTabMode(INTERNAL);
@@ -1435,11 +1432,11 @@ void FbWinFrame::applyDecorations() {
1435 client_move |= setTabMode(EXTERNAL); 1432 client_move |= setTabMode(EXTERNAL);
1436 } else { 1433 } else {
1437 client_move |= hideTitlebar(); 1434 client_move |= hideTitlebar();
1438 if (m_decoration_mask & DECORM_TAB) 1435 if (m_state.deco_mask & DECORM_TAB)
1439 client_move |= setTabMode(EXTERNAL); 1436 client_move |= setTabMode(EXTERNAL);
1440 } 1437 }
1441 1438
1442 if (m_decoration_mask & DECORM_HANDLE) 1439 if (m_state.deco_mask & DECORM_HANDLE)
1443 client_move |= showHandle(); 1440 client_move |= showHandle();
1444 else 1441 else
1445 client_move |= hideHandle(); 1442 client_move |= hideHandle();
@@ -1461,7 +1458,7 @@ void FbWinFrame::applyDecorations() {
1461 1458
1462bool FbWinFrame::setBorderWidth(bool do_move) { 1459bool FbWinFrame::setBorderWidth(bool do_move) {
1463 unsigned int border_width = theme()->border().width(); 1460 unsigned int border_width = theme()->border().width();
1464 unsigned int win_bw = m_decoration_mask & DECORM_BORDER ? border_width : 0; 1461 unsigned int win_bw = m_state.deco_mask & DECORM_BORDER ? border_width : 0;
1465 1462
1466 if (border_width && 1463 if (border_width &&
1467 theme()->border().color().pixel() != window().borderColor()) { 1464 theme()->border().color().pixel() != window().borderColor()) {
@@ -1598,7 +1595,7 @@ void FbWinFrame::gravityTranslate(int &x, int &y,
1598} 1595}
1599 1596
1600unsigned int FbWinFrame::normalHeight() const { 1597unsigned int FbWinFrame::normalHeight() const {
1601 if (m_shaded) 1598 if (m_state.shaded)
1602 return m_height_before_shade; 1599 return m_height_before_shade;
1603 return height(); 1600 return height();
1604} 1601}
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh
index 3d61860..6d8249a 100644
--- a/src/FbWinFrame.hh
+++ b/src/FbWinFrame.hh
@@ -95,25 +95,38 @@ public:
95 DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB 95 DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB
96 }; 96 };
97 97
98 typedef struct SizeHints { 98 class SizeHints {
99 public:
100 SizeHints():
101 min_width(1), max_width(0), min_height(1), max_height(0),
102 width_inc(1), height_inc(1), base_width(0), base_height(0),
103 min_aspect_x(0), max_aspect_x(0),
104 min_aspect_y(0), max_aspect_y(0) { }
105
99 void apply(unsigned int &w, unsigned int &h, 106 void apply(unsigned int &w, unsigned int &h,
100 bool maximizing = false) const; 107 bool maximizing = false) const;
101 bool valid(unsigned int width, unsigned int height) const; 108 bool valid(unsigned int width, unsigned int height) const;
102 void displaySize(unsigned int &i, unsigned int &j, 109 void displaySize(unsigned int &i, unsigned int &j,
103 unsigned int width, unsigned int height) const; 110 unsigned int width, unsigned int height) const;
104 unsigned int min_width; 111
105 unsigned int max_width; 112 unsigned int min_width, max_width, min_height, max_height,
106 unsigned int min_height; 113 width_inc, height_inc, base_width, base_height,
107 unsigned int max_height; 114 min_aspect_x, max_aspect_x, min_aspect_y, max_aspect_y;
108 unsigned int width_inc; 115 };
109 unsigned int height_inc; 116
110 unsigned int min_aspect_x; 117 class State {
111 unsigned int max_aspect_x; 118 public:
112 unsigned int min_aspect_y; 119 State():
113 unsigned int max_aspect_y; 120 size_hints(),
114 unsigned int base_width; 121 deco_mask(DECOR_NORMAL),
115 unsigned int base_height; 122 focused(false),
116 } SizeHints; 123 shaded(false), fullscreen(false), maximized(0) { }
124
125 SizeHints size_hints;
126 unsigned int deco_mask;
127 bool focused, shaded, fullscreen;
128 int maximized;
129 };
117 130
118 /// create a top level window 131 /// create a top level window
119 FbWinFrame(BScreen &screen, FocusableTheme<FbWinFrameTheme> &theme, 132 FbWinFrame(BScreen &screen, FocusableTheme<FbWinFrameTheme> &theme,
@@ -162,6 +175,9 @@ public:
162 175
163 /// set focus/unfocus style 176 /// set focus/unfocus style
164 void setFocus(bool newvalue); 177 void setFocus(bool newvalue);
178 void setFullscreen(bool value) { m_state.fullscreen = value; }
179 void setMaximized(int value) { m_state.maximized = value; }
180
165 void setFocusTitle(const std::string &str) { m_label.setText(str); } 181 void setFocusTitle(const std::string &str) { m_label.setText(str); }
166 bool setTabMode(TabMode tabmode); 182 bool setTabMode(TabMode tabmode);
167 void updateTabProperties() { alignTabs(); } 183 void updateTabProperties() { alignTabs(); }
@@ -205,14 +221,14 @@ public:
205 /// remove any handler for the windows 221 /// remove any handler for the windows
206 void removeEventHandler(); 222 void removeEventHandler();
207 223
208 const SizeHints &sizeHints() const { return m_size_hints; } 224 const SizeHints &sizeHints() const { return m_state.size_hints; }
209 void setSizeHints(const SizeHints &hint) { m_size_hints = hint; } 225 void setSizeHints(const SizeHints &hint) { m_state.size_hints = hint; }
210 226
211 void applySizeHints(unsigned int &width, unsigned int &height, 227 void applySizeHints(unsigned int &width, unsigned int &height,
212 bool maximizing = false) const; 228 bool maximizing = false) const;
213 void displaySize(unsigned int width, unsigned int height) const; 229 void displaySize(unsigned int width, unsigned int height) const;
214 230
215 void setDecorationMask(unsigned int mask) { m_decoration_mask = mask; } 231 void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; }
216 void applyDecorations(); 232 void applyDecorations();
217 233
218 // this function translates its arguments according to win_gravity 234 // this function translates its arguments according to win_gravity
@@ -271,8 +287,8 @@ public:
271 FbTk::FbWindow &gripLeft() { return m_grip_left; } 287 FbTk::FbWindow &gripLeft() { return m_grip_left; }
272 const FbTk::FbWindow &gripRight() const { return m_grip_right; } 288 const FbTk::FbWindow &gripRight() const { return m_grip_right; }
273 FbTk::FbWindow &gripRight() { return m_grip_right; } 289 FbTk::FbWindow &gripRight() { return m_grip_right; }
274 bool focused() const { return m_focused; } 290 bool focused() const { return m_state.focused; }
275 bool isShaded() const { return m_shaded; } 291 bool isShaded() const { return m_state.shaded; }
276 FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; } 292 FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; }
277 /// @return titlebar height 293 /// @return titlebar height
278 unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_titlebar.borderWidth():0); } 294 unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_titlebar.borderWidth():0); }
@@ -370,11 +386,9 @@ private:
370 m_buttons_right; ///< buttons to the right 386 m_buttons_right; ///< buttons to the right
371 typedef std::list<FbTk::TextButton *> LabelList; 387 typedef std::list<FbTk::TextButton *> LabelList;
372 int m_bevel; ///< bevel between titlebar items and titlebar 388 int m_bevel; ///< bevel between titlebar items and titlebar
373 unsigned int m_decoration_mask; ///< bitmask of applied decorations
374 bool m_use_titlebar; ///< if we should use titlebar 389 bool m_use_titlebar; ///< if we should use titlebar
375 bool m_use_tabs; ///< if we should use tabs (turns them off in external mode only) 390 bool m_use_tabs; ///< if we should use tabs (turns them off in external mode only)
376 bool m_use_handle; ///< if we should use handle 391 bool m_use_handle; ///< if we should use handle
377 bool m_focused; ///< focused/unfocused mode
378 bool m_visible; ///< if we are currently showing 392 bool m_visible; ///< if we are currently showing
379 ///< do we use screen or window alpha settings ? (0 = window, 1 = default, 2 = default and window never set) 393 ///< do we use screen or window alpha settings ? (0 = window, 1 = default, 2 = default and window never set)
380 394
@@ -419,12 +433,11 @@ private:
419 // last gravity that this window was *actively* placed with 433 // last gravity that this window was *actively* placed with
420 int m_active_gravity; 434 int m_active_gravity;
421 unsigned int m_active_orig_client_bw; 435 unsigned int m_active_orig_client_bw;
422 SizeHints m_size_hints; 436 State m_state;
423 437
424 bool m_need_render; 438 bool m_need_render;
425 int m_button_size; ///< size for all titlebar buttons 439 int m_button_size; ///< size for all titlebar buttons
426 unsigned int m_height_before_shade; ///< height before shade, so we can restore it when we unshade 440 unsigned int m_height_before_shade; ///< height before shade, so we can restore it when we unshade
427 bool m_shaded; ///< wheter we're shaded or not
428 /// alpha values 441 /// alpha values
429 typedef FbTk::ConstObjectAccessor<unsigned char, FbWinFrameTheme> AlphaAcc; 442 typedef FbTk::ConstObjectAccessor<unsigned char, FbWinFrameTheme> AlphaAcc;
430 FbTk::DefaultValue<unsigned char, AlphaAcc> m_focused_alpha; 443 FbTk::DefaultValue<unsigned char, AlphaAcc> m_focused_alpha;
diff --git a/src/Window.cc b/src/Window.cc
index a5ec2dd..866e160 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1526,6 +1526,7 @@ void FluxboxWindow::setFullscreen(bool flag) {
1526 sendConfigureNotify(); 1526 sendConfigureNotify();
1527 1527
1528 fullscreen = true; 1528 fullscreen = true;
1529 frame().setFullscreen(true);
1529 1530
1530 setFullscreenLayer(); 1531 setFullscreenLayer();
1531 if (!isFocused()) 1532 if (!isFocused())
@@ -1534,6 +1535,7 @@ void FluxboxWindow::setFullscreen(bool flag) {
1534 } else if (!flag && isFullscreen()) { 1535 } else if (!flag && isFullscreen()) {
1535 1536
1536 fullscreen = false; 1537 fullscreen = false;
1538 frame().setFullscreen(false);
1537 1539
1538 frame().setUseShape(true); 1540 frame().setUseShape(true);
1539 if (m_toggled_decos) { 1541 if (m_toggled_decos) {
@@ -1668,6 +1670,7 @@ void FluxboxWindow::setMaximizedState(int type) {
1668 maximized ^= MAX_HORZ; 1670 maximized ^= MAX_HORZ;
1669 } 1671 }
1670 1672
1673 frame().setMaximized(maximized);
1671 // ensure we apply the sizehints here, otherwise some 1674 // ensure we apply the sizehints here, otherwise some
1672 // apps (eg xterm) end up a little bit .. crappy (visually) 1675 // apps (eg xterm) end up a little bit .. crappy (visually)
1673 1676
@@ -3379,6 +3382,7 @@ void FluxboxWindow::startResizing(int x, int y, ResizeDirection dir) {
3379 3382
3380 resizing = true; 3383 resizing = true;
3381 maximized = MAX_NONE; 3384 maximized = MAX_NONE;
3385 frame().setMaximized(maximized);
3382 3386
3383 const Cursor& cursor = (m_resize_corner == LEFTTOP) ? frame().theme()->upperLeftAngleCursor() : 3387 const Cursor& cursor = (m_resize_corner == LEFTTOP) ? frame().theme()->upperLeftAngleCursor() :
3384 (m_resize_corner == RIGHTTOP) ? frame().theme()->upperRightAngleCursor() : 3388 (m_resize_corner == RIGHTTOP) ? frame().theme()->upperRightAngleCursor() :