From 5194705e309ae6e95e3991dcfc3ff0a0f4365315 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Tue, 14 Jun 2011 18:49:46 +0200 Subject: [PATCH] fixed detection of pressed state for decoration's 'toggle like' buttons. --- clients/oxygen/oxygenbutton.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 41d7f39148..1a9e3cac30 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -223,10 +223,14 @@ namespace Oxygen // draw shadow painter.drawPixmap( 0, 0, _helper.windecoButtonGlow( shadow, scale ) ); - // draw button shape - const bool pressed( (_status == Oxygen::Pressed) || - ( isChecked() && isToggleButton() ) ); + // decide on pressed state + const bool pressed( + (_status == Oxygen::Pressed) || + ( _type == ButtonSticky && _client.isOnAllDesktops() ) || + ( _type == ButtonAbove && _client.keepAbove() ) || + ( _type == ButtonBelow && _client.keepBelow() ) ); + // draw button shape painter.drawPixmap(0, 0, _helper.windecoButton( base, pressed, scale ) ); }