aboutsummaryrefslogtreecommitdiff
path: root/src/Netizen.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-10-13 21:51:37 (GMT)
committermarkt <markt>2007-10-13 21:51:37 (GMT)
commita59428d67a95a9df16554962f0a6257d6378328a (patch)
treef856ed9300c34f7a17d499f22d895610cfbc08e5 /src/Netizen.cc
parent41b5c6dadb1f474675660cef18b812d4c2338ed2 (diff)
downloadfluxbox-a59428d67a95a9df16554962f0a6257d6378328a.zip
fluxbox-a59428d67a95a9df16554962f0a6257d6378328a.tar.bz2
merged changes from pre-devel
Diffstat (limited to 'src/Netizen.cc')
-rw-r--r--src/Netizen.cc112
1 files changed, 0 insertions, 112 deletions
diff --git a/src/Netizen.cc b/src/Netizen.cc
deleted file mode 100644
index c220a83..0000000
--- a/src/Netizen.cc
+++ /dev/null
@@ -1,112 +0,0 @@
1// Netizen.cc for Fluxbox
2// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at fluxbox dot org)
3//
4// Netizen.cc for Blackbox - An X11 Window Manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
6//
7// Permission is hereby granted, free of charge, to any person obtaining a
8// copy of this software and associated documentation files (the "Software"),
9// to deal in the Software without restriction, including without limitation
10// the rights to use, copy, modify, merge, publish, distribute, sublicense,
11// and/or sell copies of the Software, and to permit persons to whom the
12// Software is furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included in
15// all copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE.
24
25#include "Netizen.hh"
26
27#include "Screen.hh"
28#include "FbAtoms.hh"
29
30#include "FbTk/App.hh"
31
32Netizen::Netizen(const BScreen &scr, Window win):
33 m_screen(scr),
34 m_display(FbTk::App::instance()->display()),
35 m_window(win) {
36
37 event.type = ClientMessage;
38 event.xclient.message_type = FbAtoms::instance()->getFluxboxStructureMessagesAtom();
39 event.xclient.display = m_display;
40 event.xclient.window = window();
41 event.xclient.format = 32;
42 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyStartupAtom();
43 event.xclient.data.l[1] = event.xclient.data.l[2] =
44 event.xclient.data.l[3] = event.xclient.data.l[4] = 0l;
45
46 XSendEvent(m_display, window(), False, NoEventMask, &event);
47}
48
49
50void Netizen::sendWorkspaceCount() {
51
52 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWorkspaceCountAtom();
53 event.xclient.data.l[1] = m_screen.numberOfWorkspaces();
54
55 XSendEvent(m_display, window(), False, NoEventMask, &event);
56}
57
58
59void Netizen::sendCurrentWorkspace() {
60
61 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyCurrentWorkspaceAtom();
62 event.xclient.data.l[1] = m_screen.currentWorkspaceID();
63
64 XSendEvent(m_display, window(), False, NoEventMask, &event);
65}
66
67
68void Netizen::sendWindowFocus(Window w) {
69 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowFocusAtom();
70 event.xclient.data.l[1] = w;
71
72 XSendEvent(m_display, window(), False, NoEventMask, &event);
73}
74
75
76void Netizen::sendWindowAdd(Window w, unsigned long wkspc) {
77 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowAddAtom();
78 event.xclient.data.l[1] = w;
79 event.xclient.data.l[2] = wkspc;
80
81 XSendEvent(m_display, window(), False, NoEventMask, &event);
82
83 event.xclient.data.l[2] = 0l;
84}
85
86
87void Netizen::sendWindowDel(Window w) {
88 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowDelAtom();
89 event.xclient.data.l[1] = w;
90
91 XSendEvent(m_display, window(), False, NoEventMask, &event);
92}
93
94
95void Netizen::sendWindowRaise(Window w) {
96 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowRaiseAtom();
97 event.xclient.data.l[1] = w;
98
99 XSendEvent(m_display, window(), False, NoEventMask, &event);
100}
101
102
103void Netizen::sendWindowLower(Window w) {
104 event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowLowerAtom();
105 event.xclient.data.l[1] = w;
106
107 XSendEvent(m_display, window(), False, NoEventMask, &event);
108}
109
110void Netizen::sendConfigNotify(XEvent &ev) {
111 XSendEvent(m_display, window(), False, StructureNotifyMask, &ev);
112}