]>
Dogcows Code - chaz/openbox/blob - otk/appwidget.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "appwidget.hh"
8 #include "application.hh"
10 #include "renderstyle.hh"
18 AppWidget::AppWidget(Application
*app
, Direction direction
, int bevel
)
19 : Widget(app
->screen(), app
, direction
, bevel
),
24 // set WM Protocols on the window
26 protocols
[0] = Property::atoms
.wm_protocols
;
27 protocols
[1] = Property::atoms
.wm_delete_window
;
28 XSetWMProtocols(**display
, window(), protocols
, 2);
31 AppWidget::~AppWidget()
35 void AppWidget::render()
37 XSetWindowBackground(**display
, window(),
38 RenderStyle::style(screen())->
39 titlebarUnfocusBackground()->color().pixel());
43 void AppWidget::show()
47 _application
->_appwidget_count
++;
50 void AppWidget::hide()
54 _application
->_appwidget_count
--;
57 void AppWidget::clientMessageHandler(const XClientMessageEvent
&e
)
59 EventHandler::clientMessageHandler(e
);
60 if (e
.message_type
== Property::atoms
.wm_protocols
&&
61 static_cast<Atom
>(e
.data
.l
[0]) == Property::atoms
.wm_delete_window
)
This page took 0.037748 seconds and 4 git commands to generate.