diff options
author | simonb <simonb> | 2006-07-04 13:20:04 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-07-04 13:20:04 (GMT) |
commit | c3846743fba060716b9090d3684fb273464ab2ae (patch) | |
tree | 65b1b5a1c1b28f12f09030ff07aedd759da8c737 | |
parent | aa589f3bdc2044571a7181ebac3f2a3e8156aa11 (diff) | |
download | fluxbox-c3846743fba060716b9090d3684fb273464ab2ae.zip fluxbox-c3846743fba060716b9090d3684fb273464ab2ae.tar.bz2 |
fix some sizing issues with gravity fixes
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/FbWinFrame.cc | 4 | ||||
-rw-r--r-- | src/FbWinFrame.hh | 2 | ||||
-rw-r--r-- | src/Window.cc | 15 |
4 files changed, 11 insertions, 12 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc3: | 2 | Changes for 1.0rc3: |
3 | *06/07/04: | 3 | *06/07/04: |
4 | * Fix some sizing issues from gravity change patch (Simon) | ||
5 | FbWinFrame.hh/cc Window.cc | ||
4 | * Auto-grouped windows using groups file didn't raise (Thanks ac2dc, bug | 6 | * Auto-grouped windows using groups file didn't raise (Thanks ac2dc, bug |
5 | #1449608) | 7 | #1449608) |
6 | Workspace.cc | 8 | Workspace.cc |
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 339c53e..0bf084f 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -241,7 +241,7 @@ void FbWinFrame::resize(unsigned int width, unsigned int height) { | |||
241 | } | 241 | } |
242 | 242 | ||
243 | // need an atomic moveresize where possible | 243 | // need an atomic moveresize where possible |
244 | void FbWinFrame::moveResizeForClient(int x, int y, unsigned int width, unsigned int height, bool move, bool resize, int win_gravity, unsigned int client_bw) { | 244 | void FbWinFrame::moveResizeForClient(int x, int y, unsigned int width, unsigned int height, int win_gravity, unsigned int client_bw, bool move, bool resize) { |
245 | // total height for frame | 245 | // total height for frame |
246 | 246 | ||
247 | if (resize) // these fns check if the elements are "on" | 247 | if (resize) // these fns check if the elements are "on" |
@@ -253,7 +253,7 @@ void FbWinFrame::moveResizeForClient(int x, int y, unsigned int width, unsigned | |||
253 | } | 253 | } |
254 | 254 | ||
255 | void FbWinFrame::resizeForClient(unsigned int width, unsigned int height, int win_gravity, unsigned int client_bw) { | 255 | void FbWinFrame::resizeForClient(unsigned int width, unsigned int height, int win_gravity, unsigned int client_bw) { |
256 | moveResizeForClient(0, 0, width, height, false, true, win_gravity, client_bw); | 256 | moveResizeForClient(0, 0, width, height, win_gravity, client_bw, false, true); |
257 | } | 257 | } |
258 | 258 | ||
259 | void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int height, bool move, bool resize) { | 259 | void FbWinFrame::moveResize(int x, int y, unsigned int width, unsigned int height, bool move, bool resize) { |
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index d128f23..26076ed 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -104,7 +104,7 @@ public: | |||
104 | // for when there needs to be an atomic move+resize operation | 104 | // for when there needs to be an atomic move+resize operation |
105 | void moveResizeForClient(int x, int y, | 105 | void moveResizeForClient(int x, int y, |
106 | unsigned int width, unsigned int height, | 106 | unsigned int width, unsigned int height, |
107 | bool move = true, bool resize = true, int win_gravity=ForgetGravity, unsigned int client_bw = 0); | 107 | int win_gravity=ForgetGravity, unsigned int client_bw = 0, bool move = true, bool resize = true); |
108 | 108 | ||
109 | // can elect to ignore move or resize (mainly for use of move/resize individual functions | 109 | // can elect to ignore move or resize (mainly for use of move/resize individual functions |
110 | void moveResize(int x, int y, | 110 | void moveResize(int x, int y, |
diff --git a/src/Window.cc b/src/Window.cc index 39f82b6..80b7ef6 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -495,11 +495,6 @@ void FluxboxWindow::init() { | |||
495 | decorations.tab = false; //no tab for this window | 495 | decorations.tab = false; //no tab for this window |
496 | } | 496 | } |
497 | 497 | ||
498 | |||
499 | if (m_client->normal_hint_flags & (PPosition|USPosition)) { | ||
500 | frame().gravityTranslate(wattrib.x, wattrib.y, m_client->gravity(), m_client->old_bw, false); | ||
501 | } | ||
502 | |||
503 | associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height, m_client->gravity(), m_client->old_bw); | 498 | associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height, m_client->gravity(), m_client->old_bw); |
504 | 499 | ||
505 | Fluxbox::instance()->attachSignals(*this); | 500 | Fluxbox::instance()->attachSignals(*this); |
@@ -543,8 +538,6 @@ void FluxboxWindow::init() { | |||
543 | wattrib.height = 1; | 538 | wattrib.height = 1; |
544 | */ | 539 | */ |
545 | 540 | ||
546 | |||
547 | |||
548 | // if we're a transient then we should be on the same layer as our parent | 541 | // if we're a transient then we should be on the same layer as our parent |
549 | if (m_client->isTransient() && | 542 | if (m_client->isTransient() && |
550 | m_client->transientFor()->fbwindow() && | 543 | m_client->transientFor()->fbwindow() && |
@@ -561,9 +554,13 @@ void FluxboxWindow::init() { | |||
561 | } | 554 | } |
562 | #endif // DEBUG | 555 | #endif // DEBUG |
563 | 556 | ||
557 | int real_width = frame().width(); | ||
558 | int real_height = frame().height() - frame().titlebarHeight() - frame().handleHeight(); | ||
559 | m_client->applySizeHints(real_width, real_height); | ||
560 | real_height += frame().titlebarHeight() + frame().handleHeight(); | ||
564 | 561 | ||
565 | if (!place_window) | 562 | if (!place_window) |
566 | moveResize(frame().x(), frame().y(), frame().width(), frame().height()); | 563 | moveResize(frame().x(), frame().y(), real_width, real_height); |
567 | 564 | ||
568 | screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); | 565 | screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); |
569 | setWorkspace(m_workspace_number); | 566 | setWorkspace(m_workspace_number); |
@@ -1376,7 +1373,7 @@ void FluxboxWindow::moveResizeForClient(int new_x, int new_y, | |||
1376 | // magic to detect if moved during initialisation | 1373 | // magic to detect if moved during initialisation |
1377 | if (!isInitialized()) | 1374 | if (!isInitialized()) |
1378 | m_old_pos_x = 1; | 1375 | m_old_pos_x = 1; |
1379 | frame().moveResizeForClient(new_x, new_y, new_width, new_height, true, true, gravity, client_bw); | 1376 | frame().moveResizeForClient(new_x, new_y, new_width, new_height, gravity, client_bw); |
1380 | setFocusFlag(focused); | 1377 | setFocusFlag(focused); |
1381 | shaded = false; | 1378 | shaded = false; |
1382 | sendConfigureNotify(); | 1379 | sendConfigureNotify(); |