aboutsummaryrefslogtreecommitdiff
path: root/src/Gnome.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-08 18:17:21 (GMT)
commit690d926ac444243611cd875fb84fabb4e6db2cf2 (patch)
treec8ef84056b295071f9a9207ffea5393c6cf4ad4d /src/Gnome.cc
parent1e8fe2bc14856fa16508686a28a85e72cb0e422c (diff)
downloadfluxbox-690d926ac444243611cd875fb84fabb4e6db2cf2.zip
fluxbox-690d926ac444243611cd875fb84fabb4e6db2cf2.tar.bz2
introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
Diffstat (limited to 'src/Gnome.cc')
-rw-r--r--src/Gnome.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Gnome.cc b/src/Gnome.cc
index 19505a3..3c84942 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -416,41 +416,40 @@ void Gnome::setState(FluxboxWindow *win, int state) {
416void Gnome::setLayer(FluxboxWindow *win, int layer) { 416void Gnome::setLayer(FluxboxWindow *win, int layer) {
417 if (!win) return; 417 if (!win) return;
418 418
419 419 const FbTk::FbString& title = win->title().logical();
420 switch (layer) { 420 switch (layer) {
421 case WIN_LAYER_DESKTOP: 421 case WIN_LAYER_DESKTOP:
422 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_DESKTOP)"<<endl; 422 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_DESKTOP)"<<endl;
423 layer = Layer::DESKTOP; 423 layer = Layer::DESKTOP;
424 break; 424 break;
425 case WIN_LAYER_BELOW: 425 case WIN_LAYER_BELOW:
426 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_BELOW)"<<endl; 426 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_BELOW)"<<endl;
427 layer = Layer::BOTTOM; 427 layer = Layer::BOTTOM;
428 break; 428 break;
429 case WIN_LAYER_NORMAL: 429 case WIN_LAYER_NORMAL:
430 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_NORMAL)"<<endl; 430 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_NORMAL)"<<endl;
431 layer = Layer::NORMAL; 431 layer = Layer::NORMAL;
432 break; 432 break;
433 case WIN_LAYER_ONTOP: 433 case WIN_LAYER_ONTOP:
434 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_ONTOP)"<<endl; 434 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_ONTOP)"<<endl;
435 layer = Layer::TOP; 435 layer = Layer::TOP;
436 break; 436 break;
437 case WIN_LAYER_DOCK: 437 case WIN_LAYER_DOCK:
438 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_DOCK)"<<endl; 438 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_DOCK)"<<endl;
439 layer = Layer::DOCK; 439 layer = Layer::DOCK;
440 break; 440 break;
441 case WIN_LAYER_ABOVE_DOCK: 441 case WIN_LAYER_ABOVE_DOCK:
442 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_ABOVE_DOCK)"<<endl; 442 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_ABOVE_DOCK)"<<endl;
443 layer = Layer::ABOVE_DOCK; 443 layer = Layer::ABOVE_DOCK;
444 break; 444 break;
445 case WIN_LAYER_MENU: 445 case WIN_LAYER_MENU:
446 fbdbg<<"Gnome::setLayer("<<win->title()<<", WIN_LAYER_MENU)"<<endl; 446 fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_MENU)"<<endl;
447 layer = Layer::MENU; 447 layer = Layer::MENU;
448 break; 448 break;
449 default: 449 default:
450 // our windows are in the opposite direction to gnome 450 // our windows are in the opposite direction to gnome
451 layer = Layer::DESKTOP - layer; 451 layer = Layer::DESKTOP - layer;
452 452 fbdbg<<"Gnome::setLayer("<<win->title().logical()<<", "<<layer<<")"<<endl;
453 fbdbg<<"Gnome::setLayer("<<win->title()<<", "<<layer<<")"<<endl;
454 453
455 break; 454 break;
456 } 455 }