From de8aaa4af81087df394276604959ce66670ff08e Mon Sep 17 00:00:00 2001 From: Lotzi Boloni Date: Sun, 12 Sep 1999 20:22:04 +0000 Subject: [PATCH] When switching to a session with the same schema the old schema is reused. This improves the switching time for transparent sessions from 10s -> several milliseconds. :-) Still, the startup can be improved because it creates the background twice, for some reason. svn path=/trunk/kdebase/konsole/; revision=29060 --- other/Makefile.am | 2 +- src/main.C | 18 +++++++++++------- src/rootBg.C | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/other/Makefile.am b/other/Makefile.am index 61035c02..ec47f072 100644 --- a/other/Makefile.am +++ b/other/Makefile.am @@ -5,7 +5,7 @@ data_DATA = BlackOnLightYellow.schema BlackOnWhite.schema \ default.Schema linux.desktop mc.desktop shell.desktop \ syscolor.schema Linux.schema XTerm.schema vim.schema \ DarkPicture.schema LightPicture.schema Transparent.schema GreenTint.schema \ - su.desktop + Transparent_MC.schema GreenTint_MC.schema su.desktop KDE_ICON = konsole diff --git a/src/main.C b/src/main.C index b6d943d3..52e59646 100644 --- a/src/main.C +++ b/src/main.C @@ -778,16 +778,20 @@ void TEDemo::activateSession(int sn) se = s; if (!s) { fprintf(stderr,"session not found\n"); return; } // oops m_sessions->setItemChecked(sn,TRUE); - setSchema(s->schemaNo()); //FIXME: creates flicker? Do only if differs -//Set Font. Now setConnect should do the appropriate action. -//if the size has changed, a resize event (noticable to the application) -//should happen. Else, we could even start the application - s->setConnect(TRUE); // does a bulkShow (setImage) - setFont(s->fontNo()); //FIXME: creates flicker? + if (s->schemaNo()!=curr_schema) { + setSchema(s->schemaNo()); //FIXME: creates flicker? Do only if differs + //Set Font. Now setConnect should do the appropriate action. + //if the size has changed, a resize event (noticable to the application) + //should happen. Else, we could even start the application + s->setConnect(TRUE); // does a bulkShow (setImage) + setFont(s->fontNo()); //FIXME: creates flicker? //FIXME: check here if we're still alife. // if not, quit, otherwise, // start propagating quit. - title = s->Title(); // take title from current session + title = s->Title(); // take title from current session + } else { + s->setConnect(TRUE); + } setHeader(); } diff --git a/src/rootBg.C b/src/rootBg.C index a88cf628..478cf6a6 100644 --- a/src/rootBg.C +++ b/src/rootBg.C @@ -230,7 +230,7 @@ void RootPixmap::generateBackground(bool shade, double r, double g, double b) bgPixmap = new QPixmap(w,h); - printf("bb %dx%d\n",w,h); + // printf("bb %dx%d\n",w,h); if ( !wpPixmap || (wpMode == Centred) || (wpMode == CentredBrick) || (wpMode == CentredWarp) || ( wpMode == CentredMaxpect) ) {