]>
Dogcows Code - chaz/openbox/blob - otk/appwidget.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
5 #include "appwidget.hh"
6 #include "application.hh"
8 #include "renderstyle.hh"
17 AppWidget::AppWidget(Application
*app
, Direction direction
, int bevel
)
18 : Widget(app
->screen(), app
, direction
, bevel
),
23 // set WM Protocols on the window
25 protocols
[0] = Property::atoms
.wm_protocols
;
26 protocols
[1] = Property::atoms
.wm_delete_window
;
27 XSetWMProtocols(**display
, window(), protocols
, 2);
30 AppWidget::~AppWidget()
34 void AppWidget::show()
37 _application
->_appwidget_count
++;
41 void AppWidget::hide()
44 _application
->_appwidget_count
--;
48 void AppWidget::clientMessageHandler(const XClientMessageEvent
&e
)
50 EventHandler::clientMessageHandler(e
);
51 if (e
.message_type
== Property::atoms
.wm_protocols
&&
52 static_cast<Atom
>(e
.data
.l
[0]) == Property::atoms
.wm_delete_window
)
This page took 0.03479 seconds and 4 git commands to generate.