Avoid one more case of unnecessary discarding window pixmap.

svn path=/trunk/KDE/kdebase/workspace/; revision=728563
This commit is contained in:
Luboš Luňák 2007-10-23 17:38:39 +00:00
parent 2922ef272e
commit dbe1f3f875
2 changed files with 8 additions and 0 deletions

View file

@ -141,6 +141,7 @@ Client::Client( Workspace *ws )
ignore_focus_stealing = false; ignore_focus_stealing = false;
demands_attention = false; demands_attention = false;
hidden_preview = false; hidden_preview = false;
raw_shown = false;
check_active_modal = false; check_active_modal = false;
Pdeletewindow = 0; Pdeletewindow = 0;
@ -866,6 +867,9 @@ void Client::setMappingState(int s)
*/ */
void Client::rawShow() 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 ) if( decoration != NULL )
decoration->widget()->show(); // not really necessary, but let it know the state decoration->widget()->show(); // not really necessary, but let it know the state
XMapWindow( display(), frameId()); XMapWindow( display(), frameId());
@ -896,6 +900,9 @@ void Client::rawShow()
*/ */
void Client::rawHide() void Client::rawHide()
{ {
if( !raw_shown )
return;
raw_shown = false;
StackingUpdatesBlocker blocker( workspace()); StackingUpdatesBlocker blocker( workspace());
addWorkspaceRepaint( geometry()); addWorkspaceRepaint( geometry());
if( options->hiddenPreviews == HiddenPreviewsNever ) if( options->hiddenPreviews == HiddenPreviewsNever )

View file

@ -449,6 +449,7 @@ class Client
uint ignore_focus_stealing : 1; // don't apply focus stealing prevention to this client uint ignore_focus_stealing : 1; // don't apply focus stealing prevention to this client
uint demands_attention : 1; uint demands_attention : 1;
uint hidden_preview : 1; // mapped only to get a window pixmap for compositing 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; WindowRules client_rules;
void getWMHints(); void getWMHints();
void readIcons(); void readIcons();