]>
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"
17 AppWidget::AppWidget(Application
*app
, Direction direction
,
18 Cursor cursor
, int bevel_width
)
19 : Widget(app
, app
->getStyle(), direction
, cursor
, bevel_width
),
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::show(void)
39 _application
->_appwidget_count
++;
42 void AppWidget::hide(void)
46 _application
->_appwidget_count
--;
49 void AppWidget::clientMessageHandler(const XClientMessageEvent
&e
)
51 EventHandler::clientMessageHandler(e
);
52 if (e
.message_type
== Property::atoms
.wm_protocols
&&
53 static_cast<Atom
>(e
.data
.l
[0]) == Property::atoms
.wm_delete_window
)
This page took 0.035581 seconds and 4 git commands to generate.