]>
Dogcows Code - chaz/openbox/blob - otk/appwidget.cc
f406c654a77275e6f7b6d5b034a92bb964597b24
1 #include "appwidget.hh"
2 #include "application.hh"
10 OtkAppWidget::OtkAppWidget(OtkApplication
*app
, Direction direction
,
11 Cursor cursor
, int bevel_width
)
12 : OtkWidget(app
, app
->getStyle(), direction
, cursor
, bevel_width
),
17 _wm_protocols
= XInternAtom(OBDisplay::display
, "WM_PROTOCOLS", false);
18 _wm_delete
= XInternAtom(OBDisplay::display
, "WM_DELETE_WINDOW", false);
20 // set WM Protocols on the window
22 protocols
[0] = _wm_protocols
;
23 protocols
[1] = _wm_delete
;
24 XSetWMProtocols(OBDisplay::display
, getWindow(), protocols
, 2);
27 OtkAppWidget::~OtkAppWidget()
31 void OtkAppWidget::show(void)
35 _application
->_appwidget_count
++;
38 void OtkAppWidget::hide(void)
42 _application
->_appwidget_count
--;
45 void OtkAppWidget::clientMessageHandler(const XClientMessageEvent
&e
)
47 OtkEventHandler::clientMessageHandler(e
);
48 if (e
.message_type
== _wm_protocols
&&
49 static_cast<Atom
>(e
.data
.l
[0]) == _wm_delete
)
This page took 0.036818 seconds and 4 git commands to generate.