diff options
author | fluxgen <fluxgen> | 2006-02-20 21:04:35 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2006-02-20 21:04:35 (GMT) |
commit | 369b4e1b92491aa57b0bf430b89bf732b80fa6a4 (patch) | |
tree | 2bf00a93ad1c195ef7d446e8989069f218a2cd47 /src/Gnome.cc | |
parent | 2566d84561ce9f5ecaf1adcce97eb578747034e3 (diff) | |
download | fluxbox-369b4e1b92491aa57b0bf430b89bf732b80fa6a4.zip fluxbox-369b4e1b92491aa57b0bf430b89bf732b80fa6a4.tar.bz2 |
moved class Layer from class Fluxbox and thus reduces some dependecies
Diffstat (limited to 'src/Gnome.cc')
-rw-r--r-- | src/Gnome.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc index c91d514..95cf08e 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc | |||
@@ -23,13 +23,15 @@ | |||
23 | 23 | ||
24 | #include "Gnome.hh" | 24 | #include "Gnome.hh" |
25 | 25 | ||
26 | #include "fluxbox.hh" | 26 | #include "App.hh" |
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
29 | #include "WinClient.hh" | 29 | #include "WinClient.hh" |
30 | #include "Workspace.hh" | 30 | #include "Workspace.hh" |
31 | #include "Layer.hh" | ||
31 | #include "FbTk/I18n.hh" | 32 | #include "FbTk/I18n.hh" |
32 | 33 | ||
34 | |||
33 | #include <iostream> | 35 | #include <iostream> |
34 | #include <new> | 36 | #include <new> |
35 | using namespace std; | 37 | using namespace std; |
@@ -279,7 +281,7 @@ void Gnome::updateState(FluxboxWindow &win) { | |||
279 | void Gnome::updateLayer(FluxboxWindow &win) { | 281 | void Gnome::updateLayer(FluxboxWindow &win) { |
280 | //TODO - map from flux layers to gnome ones | 282 | //TODO - map from flux layers to gnome ones |
281 | // our layers are in the opposite direction to GNOME | 283 | // our layers are in the opposite direction to GNOME |
282 | long layernum = Fluxbox::instance()->getDesktopLayer() - win.layerNum(); | 284 | long layernum = Layer::DESKTOP - win.layerNum(); |
283 | 285 | ||
284 | FluxboxWindow::ClientList::iterator client_it = win.clientList().begin(); | 286 | FluxboxWindow::ClientList::iterator client_it = win.clientList().begin(); |
285 | FluxboxWindow::ClientList::iterator client_it_end = win.clientList().end(); | 287 | FluxboxWindow::ClientList::iterator client_it_end = win.clientList().end(); |
@@ -418,47 +420,47 @@ void Gnome::setLayer(FluxboxWindow *win, int layer) { | |||
418 | #ifdef DEBUG | 420 | #ifdef DEBUG |
419 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_DESKTOP)"<<endl; | 421 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_DESKTOP)"<<endl; |
420 | #endif // DEBUG | 422 | #endif // DEBUG |
421 | layer = Fluxbox::instance()->getDesktopLayer(); | 423 | layer = Layer::DESKTOP; |
422 | break; | 424 | break; |
423 | case WIN_LAYER_BELOW: | 425 | case WIN_LAYER_BELOW: |
424 | #ifdef DEBUG | 426 | #ifdef DEBUG |
425 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_BELOW)"<<endl; | 427 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_BELOW)"<<endl; |
426 | #endif // DEBUG | 428 | #endif // DEBUG |
427 | layer = Fluxbox::instance()->getBottomLayer(); | 429 | layer = Layer::BOTTOM; |
428 | break; | 430 | break; |
429 | case WIN_LAYER_NORMAL: | 431 | case WIN_LAYER_NORMAL: |
430 | #ifdef DEBUG | 432 | #ifdef DEBUG |
431 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_NORMAL)"<<endl; | 433 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_NORMAL)"<<endl; |
432 | #endif // DEBUG | 434 | #endif // DEBUG |
433 | layer = Fluxbox::instance()->getNormalLayer(); | 435 | layer = Layer::NORMAL; |
434 | break; | 436 | break; |
435 | case WIN_LAYER_ONTOP: | 437 | case WIN_LAYER_ONTOP: |
436 | #ifdef DEBUG | 438 | #ifdef DEBUG |
437 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_ONTOP)"<<endl; | 439 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_ONTOP)"<<endl; |
438 | #endif // DEBUG | 440 | #endif // DEBUG |
439 | layer = Fluxbox::instance()->getTopLayer(); | 441 | layer = Layer::TOP; |
440 | break; | 442 | break; |
441 | case WIN_LAYER_DOCK: | 443 | case WIN_LAYER_DOCK: |
442 | #ifdef DEBUG | 444 | #ifdef DEBUG |
443 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_DOCK)"<<endl; | 445 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_DOCK)"<<endl; |
444 | #endif // DEBUG | 446 | #endif // DEBUG |
445 | layer = Fluxbox::instance()->getDockLayer(); | 447 | layer = Layer::DOCK; |
446 | break; | 448 | break; |
447 | case WIN_LAYER_ABOVE_DOCK: | 449 | case WIN_LAYER_ABOVE_DOCK: |
448 | #ifdef DEBUG | 450 | #ifdef DEBUG |
449 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_ABOVE_DOCK)"<<endl; | 451 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_ABOVE_DOCK)"<<endl; |
450 | #endif // DEBUG | 452 | #endif // DEBUG |
451 | layer = Fluxbox::instance()->getAboveDockLayer(); | 453 | layer = Layer::ABOVE_DOCK; |
452 | break; | 454 | break; |
453 | case WIN_LAYER_MENU: | 455 | case WIN_LAYER_MENU: |
454 | #ifdef DEBUG | 456 | #ifdef DEBUG |
455 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_MENU)"<<endl; | 457 | cerr<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_MENU)"<<endl; |
456 | #endif // DEBUG | 458 | #endif // DEBUG |
457 | layer = Fluxbox::instance()->getMenuLayer(); | 459 | layer = Layer::MENU; |
458 | break; | 460 | break; |
459 | default: | 461 | default: |
460 | // our windows are in the opposite direction to gnome | 462 | // our windows are in the opposite direction to gnome |
461 | layer = Fluxbox::instance()->getDesktopLayer() - layer; | 463 | layer = Layer::DESKTOP - layer; |
462 | #ifdef DEBUG | 464 | #ifdef DEBUG |
463 | cerr<<"Gnome::setLayer("<<win->title()<<", "<<layer<<")"<<endl; | 465 | cerr<<"Gnome::setLayer("<<win->title()<<", "<<layer<<")"<<endl; |
464 | #endif // DEBUG | 466 | #endif // DEBUG |