X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fappwidget.cc;h=5dcad7aea6e08c2628137bb577a04692534338f8;hb=a91a6f97daeb058f346246081e1c83a788787f9b;hp=5c963f7b58a5acbbf90703c487e7d78eb7b952c5;hpb=99cd843fc6dc7a7f55b6c90fd1162f233853aad2;p=chaz%2Fopenbox diff --git a/otk/appwidget.cc b/otk/appwidget.cc index 5c963f7b..5dcad7ae 100644 --- a/otk/appwidget.cc +++ b/otk/appwidget.cc @@ -1,13 +1,12 @@ // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -#ifdef HAVE_CONFIG_H -# include "../config.h" -#endif +#include "config.h" #include "appwidget.hh" #include "application.hh" #include "property.hh" #include "renderstyle.hh" +#include "display.hh" extern "C" { #include @@ -32,26 +31,18 @@ AppWidget::~AppWidget() { } -void AppWidget::render() -{ - XSetWindowBackground(**display, window(), - RenderStyle::style(screen())-> - titlebarUnfocusBackground()->color().pixel()); - Widget::render(); -} - void AppWidget::show() { - Widget::show(true); - + if (!visible()) _application->_appwidget_count++; + Widget::show(true); } void AppWidget::hide() { + if (visible()) + _application->_appwidget_count--; Widget::hide(); - - _application->_appwidget_count--; } void AppWidget::clientMessageHandler(const XClientMessageEvent &e)