From dbe1f3f875c0b72aeaec6ece4f837e43a561d8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 23 Oct 2007 17:38:39 +0000 Subject: [PATCH] Avoid one more case of unnecessary discarding window pixmap. svn path=/trunk/KDE/kdebase/workspace/; revision=728563 --- client.cpp | 7 +++++++ client.h | 1 + 2 files changed, 8 insertions(+) diff --git a/client.cpp b/client.cpp index 1fe926e299..199a4f01b6 100644 --- a/client.cpp +++ b/client.cpp @@ -141,6 +141,7 @@ Client::Client( Workspace *ws ) ignore_focus_stealing = false; demands_attention = false; hidden_preview = false; + raw_shown = false; check_active_modal = false; Pdeletewindow = 0; @@ -866,6 +867,9 @@ void Client::setMappingState(int s) */ void Client::rawShow() { + if( raw_shown ) // this flag is used to purely avoid repeated calls to rawShow(), + return; // it doesn't say anything more about the state + raw_shown = true; if( decoration != NULL ) decoration->widget()->show(); // not really necessary, but let it know the state XMapWindow( display(), frameId()); @@ -896,6 +900,9 @@ void Client::rawShow() */ void Client::rawHide() { + if( !raw_shown ) + return; + raw_shown = false; StackingUpdatesBlocker blocker( workspace()); addWorkspaceRepaint( geometry()); if( options->hiddenPreviews == HiddenPreviewsNever ) diff --git a/client.h b/client.h index b98ba65958..fdb06ba538 100644 --- a/client.h +++ b/client.h @@ -449,6 +449,7 @@ class Client uint ignore_focus_stealing : 1; // don't apply focus stealing prevention to this client uint demands_attention : 1; uint hidden_preview : 1; // mapped only to get a window pixmap for compositing + uint raw_shown : 1; // for use in rawShow()/rawHide() WindowRules client_rules; void getWMHints(); void readIcons();