]>
Dogcows Code - chaz/openbox/blob - otk/appwidget.cc
d1ae736959e4a3507c0ecba69c43df290ef9167c
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "appwidget.hh"
8 #include "application.hh"
17 AppWidget::AppWidget(Application
*app
, Direction direction
,
18 Cursor cursor
, int bevel_width
)
19 : Widget(app
, app
->getStyle(), direction
, cursor
, bevel_width
),
24 _wm_protocols
= Property::atoms
.wm_protocols
;
25 _wm_delete
= Property::atoms
.wm_protocols
;
27 // set WM Protocols on the window
29 protocols
[0] = _wm_protocols
;
30 protocols
[1] = _wm_delete
;
31 XSetWMProtocols(**display
, window(), protocols
, 2);
34 AppWidget::~AppWidget()
38 void AppWidget::show(void)
42 _application
->_appwidget_count
++;
45 void AppWidget::hide(void)
49 _application
->_appwidget_count
--;
52 void AppWidget::clientMessageHandler(const XClientMessageEvent
&e
)
54 EventHandler::clientMessageHandler(e
);
55 if (e
.message_type
== _wm_protocols
&&
56 static_cast<Atom
>(e
.data
.l
[0]) == _wm_delete
)
This page took 0.035052 seconds and 4 git commands to generate.