aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2001-12-17 00:46:15 (GMT)
committerfluxgen <fluxgen>2001-12-17 00:46:15 (GMT)
commitb6ae55efd12beacf9261f0c84549c9625f243560 (patch)
tree26c79b86817a5c4c0296c5b3d016075333802184 /src/Window.cc
parent98eb553afa016c54b6aeff157bc2240c02603e94 (diff)
downloadfluxbox_pavel-b6ae55efd12beacf9261f0c84549c9625f243560.zip
fluxbox_pavel-b6ae55efd12beacf9261f0c84549c9625f243560.tar.bz2
Merge with pekdon
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc58
1 files changed, 45 insertions, 13 deletions
diff --git a/src/Window.cc b/src/Window.cc
index bba0d04..3618e32 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -291,12 +291,41 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen *s) {
291 client.normal_hint_flags & (PPosition|USPosition)) { 291 client.normal_hint_flags & (PPosition|USPosition)) {
292 setGravityOffsets(); 292 setGravityOffsets();
293 293
294 if ((fluxbox->isStartup()) || 294 if (! fluxbox->isStartup()) { // is going to be used when position
295 if (decorations.tab) { // window is cleanly fixed
296 int real_x = frame.x;
297 int real_y = frame.y;
298
299 if (screen->getTabPlacement() == Tab::PTop)
300 real_y -= screen->getTabHeight();
301
302 else if (screen->getTabPlacement() == Tab::PLeft) {
303 if (screen->isTabRotateVertical())
304 real_x -= screen->getTabHeight();
305 else
306 real_x -= screen->getTabWidth();
307 }
308
309 if (real_x >= 0 &&
310 real_y + frame.y_border >= 0 &&
311 real_x <= (signed) screen->getWidth() &&
312 real_y <= (signed) screen->getHeight())
313 place_window = false;
314
315 } else if (frame.x >= 0 && // non tab
316 (signed) (frame.y + frame.y_border) >= 0 &&
317 frame.x <= (signed) screen->getWidth() &&
318 frame.y <= (signed) screen->getHeight())
319 place_window = false;
320 } else
321 place_window = false;
322
323/* if ((fluxbox->isStartup()) ||
295 (frame.x >= 0 && 324 (frame.x >= 0 &&
296 (signed) (frame.y + frame.y_border) >= 0 && 325 (signed) (frame.y + frame.y_border) >= 0 &&
297 frame.x <= (signed) screen->getWidth() && 326 frame.x <= (signed) screen->getWidth() &&
298 frame.y <= (signed) screen->getHeight())) 327 frame.y <= (signed) screen->getHeight()))
299 place_window = false; 328 place_window = false; */
300 329
301 } 330 }
302 331
@@ -1671,6 +1700,9 @@ void FluxboxWindow::setTab(bool flag) {
1671 if (flag) { 1700 if (flag) {
1672 if (!tab) 1701 if (!tab)
1673 tab = new Tab(this, 0, 0); 1702 tab = new Tab(this, 0, 0);
1703 tab->focus(); // draws the tab with correct texture
1704 tab->setPosition(); // set tab windows position
1705
1674 } else if (tab) { 1706 } else if (tab) {
1675 delete tab; 1707 delete tab;
1676 tab = 0; 1708 tab = 0;
@@ -1846,30 +1878,30 @@ void FluxboxWindow::maximize(unsigned int button) {
1846 if (decorations.tab && Fluxbox::instance()->useTabs()) { // Want to se the tabs 1878 if (decorations.tab && Fluxbox::instance()->useTabs()) { // Want to se the tabs
1847 switch(screen->getTabPlacement()) { 1879 switch(screen->getTabPlacement()) {
1848 case Tab::PTop: 1880 case Tab::PTop:
1849 dy += Fluxbox::instance()->getTabHeight(); 1881 dy += screen->getTabHeight();
1850 dh -= Fluxbox::instance()->getTabHeight() + screen->getBorderWidth(); 1882 dh -= screen->getTabHeight() + screen->getBorderWidth();
1851 break; 1883 break;
1852 case Tab::PLeft: 1884 case Tab::PLeft:
1853 if (screen->isTabRotateVertical()) { 1885 if (screen->isTabRotateVertical()) {
1854 dx += Fluxbox::instance()->getTabHeight(); 1886 dx += screen->getTabHeight();
1855 dw -= Fluxbox::instance()->getTabHeight(); 1887 dw -= screen->getTabHeight();
1856 } else { 1888 } else {
1857 dx += Fluxbox::instance()->getTabWidth(); 1889 dx += screen->getTabWidth();
1858 dw -= Fluxbox::instance()->getTabWidth(); 1890 dw -= screen->getTabWidth();
1859 } 1891 }
1860 break; 1892 break;
1861 case Tab::PRight: 1893 case Tab::PRight:
1862 if (screen->isTabRotateVertical()) 1894 if (screen->isTabRotateVertical())
1863 dw -= Fluxbox::instance()->getTabHeight(); 1895 dw -= screen->getTabHeight();
1864 else 1896 else
1865 dw -= Fluxbox::instance()->getTabWidth(); 1897 dw -= screen->getTabWidth();
1866 break; 1898 break;
1867 case Tab::PBottom: 1899 case Tab::PBottom:
1868 dh -= Fluxbox::instance()->getTabHeight() + screen->getBorderWidth(); 1900 dh -= screen->getTabHeight() + screen->getBorderWidth();
1869 break; 1901 break;
1870 default: 1902 default:
1871 dy += Fluxbox::instance()->getTabHeight(); 1903 dy += screen->getTabHeight();
1872 dh -= Fluxbox::instance()->getTabHeight() + screen->getBorderWidth(); 1904 dh -= screen->getTabHeight() + screen->getBorderWidth();
1873 break; 1905 break;
1874 } 1906 }
1875 } 1907 }