]>
Dogcows Code - chaz/openbox/blob - appwidget.cc
ee5428838185685beacc2869ca93b0e5fb9d20d8
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "appwidget.hh"
8 #include "application.hh"
16 AppWidget::AppWidget(Application
*app
, Direction direction
,
17 Cursor cursor
, int bevel_width
)
18 : Widget(app
, app
->getStyle(), direction
, cursor
, bevel_width
),
23 _wm_protocols
= XInternAtom(**display
, "WM_PROTOCOLS", false);
24 _wm_delete
= XInternAtom(**display
, "WM_DELETE_WINDOW", false);
26 // set WM Protocols on the window
28 protocols
[0] = _wm_protocols
;
29 protocols
[1] = _wm_delete
;
30 XSetWMProtocols(**display
, window(), protocols
, 2);
33 AppWidget::~AppWidget()
37 void AppWidget::show(void)
41 _application
->_appwidget_count
++;
44 void AppWidget::hide(void)
48 _application
->_appwidget_count
--;
51 void AppWidget::clientMessageHandler(const XClientMessageEvent
&e
)
53 EventHandler::clientMessageHandler(e
);
54 if (e
.message_type
== _wm_protocols
&&
55 static_cast<Atom
>(e
.data
.l
[0]) == _wm_delete
)
This page took 0.034665 seconds and 3 git commands to generate.