aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-09-09 21:42:30 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-09-09 21:42:30 (GMT)
commit715dc907ae6a4ca65c492f94ce6379f59eff5157 (patch)
treeddb7c5887b95bcdee282625eaae49529c2444785
parentaacfa220ede8ab8eb0f8c095dd0ef1542a804398 (diff)
downloadfbpager-715dc907ae6a4ca65c492f94ce6379f59eff5157.zip
fbpager-715dc907ae6a4ca65c492f94ce6379f59eff5157.tar.bz2
remove a bunch of stuff that isn't used anymore
-rw-r--r--src/FbAtoms.cc94
-rw-r--r--src/FbAtoms.hh102
-rw-r--r--src/FbPager.cc23
-rw-r--r--src/FbPager.hh2
-rw-r--r--src/FluxboxHandler.cc200
-rw-r--r--src/FluxboxHandler.hh58
-rw-r--r--src/Makefile.am6
-rw-r--r--src/Makefile.in572
-rw-r--r--src/main.cc4
9 files changed, 5 insertions, 1056 deletions
diff --git a/src/FbAtoms.cc b/src/FbAtoms.cc
deleted file mode 100644
index 7c8a971..0000000
--- a/src/FbAtoms.cc
+++ /dev/null
@@ -1,94 +0,0 @@
1// FbAtom.cc
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: FbAtoms.cc,v 1.5 2002/12/01 13:41:56 rathnor Exp $
23
24#include "FbAtoms.hh"
25
26#include <string>
27#include <cassert>
28using namespace std;
29
30FbAtoms *FbAtoms::s_singleton = 0;
31
32FbAtoms::FbAtoms(Display *display):m_init(false) {
33 if (s_singleton != 0)
34 throw string("You can only create one instance of FbAtoms");
35
36 if (display == 0)
37 throw string("Must supply FbAtoms with an valid display connection");
38
39 s_singleton = this;
40 initAtoms(display);
41}
42
43FbAtoms::~FbAtoms() {
44
45}
46
47FbAtoms *FbAtoms::instance() {
48 assert(s_singleton);
49 return s_singleton;
50}
51
52void FbAtoms::initAtoms(Display *display) {
53
54 xa_wm_colormap_windows =
55 XInternAtom(display, "WM_COLORMAP_WINDOWS", False);
56 xa_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
57 xa_wm_state = XInternAtom(display, "WM_STATE", False);
58 xa_wm_change_state = XInternAtom(display, "WM_CHANGE_STATE", False);
59 xa_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False);
60 xa_wm_take_focus = XInternAtom(display, "WM_TAKE_FOCUS", False);
61 motif_wm_hints = XInternAtom(display, "_MOTIF_WM_HINTS", False);
62
63 blackbox_hints = XInternAtom(display, "_BLACKBOX_HINTS", False);
64 blackbox_attributes = XInternAtom(display, "_BLACKBOX_ATTRIBUTES", False);
65 blackbox_change_attributes =
66 XInternAtom(display, "_BLACKBOX_CHANGE_ATTRIBUTES", False);
67
68 blackbox_structure_messages =
69 XInternAtom(display, "_BLACKBOX_STRUCTURE_MESSAGES", False);
70 blackbox_notify_startup =
71 XInternAtom(display, "_BLACKBOX_NOTIFY_STARTUP", False);
72 blackbox_notify_window_add =
73 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_ADD", False);
74 blackbox_notify_window_del =
75 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_DEL", False);
76 blackbox_notify_current_workspace =
77 XInternAtom(display, "_BLACKBOX_NOTIFY_CURRENT_WORKSPACE", False);
78 blackbox_notify_workspace_count =
79 XInternAtom(display, "_BLACKBOX_NOTIFY_WORKSPACE_COUNT", False);
80 blackbox_notify_window_focus =
81 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_FOCUS", False);
82 blackbox_notify_window_raise =
83 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_RAISE", False);
84 blackbox_notify_window_lower =
85 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_LOWER", False);
86
87 blackbox_change_workspace =
88 XInternAtom(display, "_BLACKBOX_CHANGE_WORKSPACE", False);
89 blackbox_change_window_focus =
90 XInternAtom(display, "_BLACKBOX_CHANGE_WINDOW_FOCUS", False);
91 blackbox_cycle_window_focus =
92 XInternAtom(display, "_BLACKBOX_CYCLE_WINDOW_FOCUS", False);
93
94}
diff --git a/src/FbAtoms.hh b/src/FbAtoms.hh
deleted file mode 100644
index 13b943b..0000000
--- a/src/FbAtoms.hh
+++ /dev/null
@@ -1,102 +0,0 @@
1// FbAtom.hh
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: FbAtoms.hh,v 1.8 2002/12/01 13:41:56 rathnor Exp $
23#ifndef FBATOMS_HH
24#define FBATOMS_HH
25
26#include <X11/Xlib.h>
27#include <X11/Xatom.h>
28
29/**
30 atom handler for base atoms
31*/
32class FbAtoms {
33public:
34 explicit FbAtoms(Display *display);
35 virtual ~FbAtoms();
36 static FbAtoms *instance();
37
38
39 inline Atom getWMChangeStateAtom() const { return xa_wm_change_state; }
40 inline Atom getWMStateAtom() const { return xa_wm_state; }
41 inline Atom getWMDeleteAtom() const { return xa_wm_delete_window; }
42 inline Atom getWMProtocolsAtom() const { return xa_wm_protocols; }
43 inline Atom getWMTakeFocusAtom() const { return xa_wm_take_focus; }
44 inline Atom getWMColormapAtom() const { return xa_wm_colormap_windows; }
45 inline Atom getMotifWMHintsAtom() const { return motif_wm_hints; }
46
47 // this atom is for normal app->WM hints about decorations, stacking,
48 // starting workspace etc...
49 inline Atom getFluxboxHintsAtom() const { return blackbox_hints;}
50
51 // these atoms are for normal app->WM interaction beyond the scope of the
52 // ICCCM...
53 inline Atom getFluxboxAttributesAtom() const { return blackbox_attributes; }
54 inline Atom getFluxboxChangeAttributesAtom() const { return blackbox_change_attributes; }
55
56 // these atoms are for window->WM interaction, with more control and
57 // information on window "structure"... common examples are
58 // notifying apps when windows are raised/lowered... when the user changes
59 // workspaces... i.e. "pager talk"
60 inline Atom getFluxboxStructureMessagesAtom() const{ return blackbox_structure_messages; }
61
62 // *Notify* portions of the NETStructureMessages protocol
63 inline Atom getFluxboxNotifyStartupAtom() const { return blackbox_notify_startup; }
64 inline Atom getFluxboxNotifyWindowAddAtom() const { return blackbox_notify_window_add; }
65 inline Atom getFluxboxNotifyWindowDelAtom() const { return blackbox_notify_window_del; }
66 inline Atom getFluxboxNotifyWindowFocusAtom() const { return blackbox_notify_window_focus; }
67 inline Atom getFluxboxNotifyCurrentWorkspaceAtom() const { return blackbox_notify_current_workspace; }
68 inline Atom getFluxboxNotifyWorkspaceCountAtom() const { return blackbox_notify_workspace_count; }
69 inline Atom getFluxboxNotifyWindowRaiseAtom() const { return blackbox_notify_window_raise; }
70 inline Atom getFluxboxNotifyWindowLowerAtom() const { return blackbox_notify_window_lower; }
71
72 // atoms to change that request changes to the desktop environment during
73 // runtime... these messages can be sent by any client... as the sending
74 // client window id is not included in the ClientMessage event...
75 inline Atom getFluxboxChangeWorkspaceAtom() const { return blackbox_change_workspace; }
76 inline Atom getFluxboxChangeWindowFocusAtom() const { return blackbox_change_window_focus; }
77 inline Atom getFluxboxCycleWindowFocusAtom() const { return blackbox_cycle_window_focus; }
78
79private:
80 void initAtoms(Display *disp);
81// NETAttributes
82 Atom blackbox_attributes, blackbox_change_attributes, blackbox_hints;
83
84 // NETStructureMessages
85 Atom blackbox_structure_messages, blackbox_notify_startup,
86 blackbox_notify_window_add, blackbox_notify_window_del,
87 blackbox_notify_window_focus, blackbox_notify_current_workspace,
88 blackbox_notify_workspace_count, blackbox_notify_window_raise,
89 blackbox_notify_window_lower;
90
91 // message_types for client -> wm messages
92 Atom blackbox_change_workspace, blackbox_change_window_focus,
93 blackbox_cycle_window_focus;
94
95 Atom xa_wm_colormap_windows, xa_wm_protocols, xa_wm_state,
96 xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state,
97 motif_wm_hints;
98 bool m_init;
99 static FbAtoms *s_singleton;
100};
101
102#endif //FBATOMS_HH
diff --git a/src/FbPager.cc b/src/FbPager.cc
index bf55eb4..3955200 100644
--- a/src/FbPager.cc
+++ b/src/FbPager.cc
@@ -31,11 +31,9 @@
31 31
32// client handlers 32// client handlers
33#include "Ewmh.hh" 33#include "Ewmh.hh"
34#include "FluxboxHandler.hh"
35 34
36#include "Workspace.hh" 35#include "Workspace.hh"
37#include "WindowHint.hh" 36#include "WindowHint.hh"
38#include "FbAtoms.hh"
39#include "ScaleWindowToWindow.hh" 37#include "ScaleWindowToWindow.hh"
40#include "Resources.hh" 38#include "Resources.hh"
41#include "RefBinder.hh" 39#include "RefBinder.hh"
@@ -119,8 +117,6 @@ namespace FbPager {
119 117
120 118
121FbPager::FbPager(int screen_num, bool withdraw, 119FbPager::FbPager(int screen_num, bool withdraw,
122 bool use_fbhandler,
123 bool use_ewmhhandler,
124 bool show_resources, 120 bool show_resources,
125 int layer_flag, 121 int layer_flag,
126 const char *resource_filename): 122 const char *resource_filename):
@@ -236,12 +232,7 @@ FbPager::FbPager(int screen_num, bool withdraw,
236 "FbPager.Border.Inactive.Color"), 232 "FbPager.Border.Inactive.Color"),
237 m_last_workspace_num(-1) { 233 m_last_workspace_num(-1) {
238 234
239 235 m_clienthandlers.push_back(new Ewmh());
240 if (use_fbhandler)
241 m_clienthandlers.push_back(new FluxboxHandler());
242
243 if (use_ewmhhandler)
244 m_clienthandlers.push_back(new Ewmh());
245 236
246 XSetErrorHandler(handleXErrors); 237 XSetErrorHandler(handleXErrors);
247 238
@@ -253,17 +244,6 @@ FbPager::FbPager(int screen_num, bool withdraw,
253 m_window.setAlpha(*m_alpha); 244 m_window.setAlpha(*m_alpha);
254 245
255 246
256 Display *disp = FbTk::App::instance()->display();
257 Atom wmproto[2];
258 int wmprot_size = 1;
259 wmproto[0] = XInternAtom(disp, "WM_DELETE_WINDOW", False);
260 if (FluxboxHandler::handler() != 0) {
261 wmprot_size = 2;
262 wmproto[1] = FbAtoms::instance()->getFluxboxStructureMessagesAtom();
263 }
264 XSetWMProtocols(disp, m_window.window(), wmproto, wmprot_size);
265
266
267 XWMHints wmhints; 247 XWMHints wmhints;
268 248
269 if (!withdraw) { 249 if (!withdraw) {
@@ -286,6 +266,7 @@ FbPager::FbPager(int screen_num, bool withdraw,
286 XStringListToTextProperty(&name_prop, 1, &windowname); 266 XStringListToTextProperty(&name_prop, 1, &windowname);
287 267
288 // setup class hints 268 // setup class hints
269 Display *disp = FbTk::App::instance()->display();
289 XClassHint classhints; 270 XClassHint classhints;
290 string res_name = "fbpager"; 271 string res_name = "fbpager";
291 string res_class = "FbPager"; 272 string res_class = "FbPager";
diff --git a/src/FbPager.hh b/src/FbPager.hh
index c6b71c5..02fe1b6 100644
--- a/src/FbPager.hh
+++ b/src/FbPager.hh
@@ -47,8 +47,6 @@ class FbPager:public FbTk::EventHandler, public Pager, private FbTk::NotCopyable
47public: 47public:
48 enum Alignment { LEFT_TO_RIGHT, TOP_TO_BOTTOM}; 48 enum Alignment { LEFT_TO_RIGHT, TOP_TO_BOTTOM};
49 FbPager(int screen_num, bool withdraw, 49 FbPager(int screen_num, bool withdraw,
50 bool use_fbhandler,
51 bool use_ewhmhandler,
52 bool show_resources, 50 bool show_resources,
53 int layer_flags, 51 int layer_flags,
54 const char *resource_filename=0); 52 const char *resource_filename=0);
diff --git a/src/FluxboxHandler.cc b/src/FluxboxHandler.cc
deleted file mode 100644
index 23fa1c6..0000000
--- a/src/FluxboxHandler.cc
+++ /dev/null
@@ -1,200 +0,0 @@
1// FluxboxHandler.cc for FbPager
2// Copyright (c) 2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3//
4// Permission is hereby grant