diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-22 10:36:26 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-22 10:36:26 (GMT) |
commit | 8681220f5361fef500d7eda28d9f22bbf0a006e4 (patch) | |
tree | c4a53e66ef743fe52f8176e7cf828a8796ac7bc8 /src/FbWinFrame.cc | |
parent | 2f3a48f17fead42b6b2ed906318641e279bb9505 (diff) | |
download | fluxbox-8681220f5361fef500d7eda28d9f22bbf0a006e4.zip fluxbox-8681220f5361fef500d7eda28d9f22bbf0a006e4.tar.bz2 |
don't apply rounded corners to windows without decorations
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 284a1b5..f050a6d 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -91,8 +91,7 @@ FbWinFrame::FbWinFrame(BScreen &screen, | |||
91 | m_height_before_shade(1), | 91 | m_height_before_shade(1), |
92 | m_focused_alpha(AlphaAcc(*theme.focusedTheme(), &FbWinFrameTheme::alpha)), | 92 | m_focused_alpha(AlphaAcc(*theme.focusedTheme(), &FbWinFrameTheme::alpha)), |
93 | m_unfocused_alpha(AlphaAcc(*theme.unfocusedTheme(), &FbWinFrameTheme::alpha)), | 93 | m_unfocused_alpha(AlphaAcc(*theme.unfocusedTheme(), &FbWinFrameTheme::alpha)), |
94 | m_shape(m_window, theme->shapePlace()), | 94 | m_shape(m_window, theme->shapePlace()) { |
95 | m_disable_themeshape(false) { | ||
96 | init(); | 95 | init(); |
97 | } | 96 | } |
98 | 97 | ||
@@ -994,26 +993,12 @@ void FbWinFrame::reconfigure() { | |||
994 | m_need_render = true; | 993 | m_need_render = true; |
995 | } | 994 | } |
996 | 995 | ||
997 | if (m_disable_themeshape) | 996 | m_shape.setPlaces(getShape()); |
998 | m_shape.setPlaces(FbTk::Shape::NONE); | ||
999 | else | ||
1000 | m_shape.setPlaces(theme()->shapePlace()); | ||
1001 | |||
1002 | m_shape.setShapeOffsets(0, titlebarHeight()); | 997 | m_shape.setShapeOffsets(0, titlebarHeight()); |
1003 | 998 | ||
1004 | // titlebar stuff rendered already by reconftitlebar | 999 | // titlebar stuff rendered already by reconftitlebar |
1005 | } | 1000 | } |
1006 | 1001 | ||
1007 | void FbWinFrame::setUseShape(bool value) { | ||
1008 | m_disable_themeshape = !value; | ||
1009 | |||
1010 | if (m_disable_themeshape) | ||
1011 | m_shape.setPlaces(FbTk::Shape::NONE); | ||
1012 | else | ||
1013 | m_shape.setPlaces(theme()->shapePlace()); | ||
1014 | |||
1015 | } | ||
1016 | |||
1017 | void FbWinFrame::setShapingClient(FbTk::FbWindow *win, bool always_update) { | 1002 | void FbWinFrame::setShapingClient(FbTk::FbWindow *win, bool always_update) { |
1018 | m_shape.setShapeSource(win, 0, titlebarHeight(), always_update); | 1003 | m_shape.setShapeSource(win, 0, titlebarHeight(), always_update); |
1019 | } | 1004 | } |
@@ -1319,8 +1304,6 @@ void FbWinFrame::init() { | |||
1319 | if (theme()->handleWidth() == 0) | 1304 | if (theme()->handleWidth() == 0) |
1320 | m_use_handle = false; | 1305 | m_use_handle = false; |
1321 | 1306 | ||
1322 | m_disable_themeshape = false; | ||
1323 | |||
1324 | m_handle.showSubwindows(); | 1307 | m_handle.showSubwindows(); |
1325 | 1308 | ||
1326 | // clear pixmaps | 1309 | // clear pixmaps |
@@ -1483,6 +1466,15 @@ bool FbWinFrame::useHandle() const { | |||
1483 | return !m_state.fullscreen && m_state.deco_mask & DECORM_HANDLE; | 1466 | return !m_state.fullscreen && m_state.deco_mask & DECORM_HANDLE; |
1484 | } | 1467 | } |
1485 | 1468 | ||
1469 | int FbWinFrame::getShape() const { | ||
1470 | int shape = theme()->shapePlace(); | ||
1471 | if (!useTitlebar()) | ||
1472 | shape &= ~(FbTk::Shape::TOPRIGHT|FbTk::Shape::TOPLEFT); | ||
1473 | if (!useHandle()) | ||
1474 | shape &= ~(FbTk::Shape::BOTTOMRIGHT|FbTk::Shape::BOTTOMLEFT); | ||
1475 | return shape; | ||
1476 | } | ||
1477 | |||
1486 | void FbWinFrame::applyDecorations() { | 1478 | void FbWinFrame::applyDecorations() { |
1487 | int grav_x=0, grav_y=0; | 1479 | int grav_x=0, grav_y=0; |
1488 | // negate gravity | 1480 | // negate gravity |