summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-19 11:55:49 (GMT)
committerrathnor <rathnor>2003-07-19 11:55:49 (GMT)
commit2f1f364fa2d7c72b93d4dbcde321abace5e2109d (patch)
tree0cf9bd8b1b08922dbc09c19310d9bfb76ea64c3a /src
parent939e750684971412eda6245ef012435c86ee2d47 (diff)
downloadfluxbox_lack-2f1f364fa2d7c72b93d4dbcde321abace5e2109d.zip
fluxbox_lack-2f1f364fa2d7c72b93d4dbcde321abace5e2109d.tar.bz2
fix up xinerama for heads of toolbar and slit
Diffstat (limited to 'src')
-rw-r--r--src/Slit.cc11
-rw-r--r--src/Slit.hh4
-rw-r--r--src/Toolbar.cc9
-rw-r--r--src/Toolbar.hh5
-rw-r--r--src/Window.cc5
-rw-r--r--src/Xinerama.hh18
-rw-r--r--src/fluxbox.hh4
7 files changed, 37 insertions, 19 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index 69d4824..da2b860 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Slit.cc,v 1.72 2003/07/18 15:40:55 rathnor Exp $ 25// $Id: Slit.cc,v 1.73 2003/07/19 11:55:49 rathnor Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -1263,7 +1263,7 @@ void Slit::setupMenu() {
1263 screen(), 1263 screen(),
1264 screen().imageControl(), 1264 screen().imageControl(),
1265 *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), 1265 *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
1266 this 1266 *this
1267 )); 1267 ));
1268 } 1268 }
1269 1269
@@ -1344,3 +1344,10 @@ void Slit::moveToLayer(int layernum) {
1344 m_layeritem->moveToLayer(layernum); 1344 m_layeritem->moveToLayer(layernum);
1345 *m_rc_layernum = layernum; 1345 *m_rc_layernum = layernum;
1346} 1346}
1347
1348void Slit::saveOnHead(int head) {
1349 m_rc_on_head = head;
1350 // reposition
1351 reconfigure();
1352}
1353
diff --git a/src/Slit.hh b/src/Slit.hh
index 5fa80bd..023d35d 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25/// $Id: Slit.hh,v 1.35 2003/06/24 13:42:23 fluxgen Exp $ 25/// $Id: Slit.hh,v 1.36 2003/07/19 11:55:49 rathnor Exp $
26 26
27#ifndef SLIT_HH 27#ifndef SLIT_HH
28#define SLIT_HH 28#define SLIT_HH
@@ -68,7 +68,7 @@ public:
68 inline Direction direction() const { return *m_rc_direction; } 68 inline Direction direction() const { return *m_rc_direction; }
69 inline Placement placement() const { return *m_rc_placement; } 69 inline Placement placement() const { return *m_rc_placement; }
70 inline int getOnHead() const { return *m_rc_on_head; } 70 inline int getOnHead() const { return *m_rc_on_head; }
71 inline void saveOnHead(int head) { m_rc_on_head = head; } 71 void saveOnHead(int head);
72 FbTk::Menu &menu() { return m_slitmenu; } 72 FbTk::Menu &menu() { return m_slitmenu; }
73 73
74 inline const FbTk::FbWindow &window() const { return frame.window; } 74 inline const FbTk::FbWindow &window() const { return frame.window; }
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index e0f4424..251d8dd 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.cc,v 1.101 2003/07/18 15:40:55 rathnor Exp $ 25// $Id: Toolbar.cc,v 1.102 2003/07/19 11:55:49 rathnor Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -1397,7 +1397,7 @@ void Toolbar::setupMenus() {
1397 tbar.screen(), 1397 tbar.screen(),
1398 tbar.screen().imageControl(), 1398 tbar.screen().imageControl(),
1399 *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), 1399 *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
1400 &tbar 1400 tbar
1401 )); 1401 ));
1402 } 1402 }
1403 1403
@@ -1442,3 +1442,8 @@ void Toolbar::setupMenus() {
1442 tbar.placementMenu().update(); 1442 tbar.placementMenu().update();
1443 menu.update(); 1443 menu.update();
1444} 1444}
1445
1446void Toolbar::saveOnHead(int head) {
1447 m_rc_on_head = head;
1448 reconfigure();
1449}
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index 59b1600..70b30e2 100644
--- a/src/Toolbar.hh
+++ b/src/Toolbar.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.hh,v 1.38 2003/07/10 15:52:58 fluxgen Exp $ 25// $Id: Toolbar.hh,v 1.39 2003/07/19 11:55:49 rathnor Exp $
26 26
27#ifndef TOOLBAR_HH 27#ifndef TOOLBAR_HH
28#define TOOLBAR_HH 28#define TOOLBAR_HH
@@ -118,6 +118,9 @@ public:
118 inline ToolbarTheme &theme() { return m_theme; } 118 inline ToolbarTheme &theme() { return m_theme; }
119 bool isVertical() const; 119 bool isVertical() const;
120 120
121 inline int getOnHead() const { return *m_rc_on_head; }
122 void saveOnHead(int head);
123
121 /** 124 /**
122 @name eventhandlers 125 @name eventhandlers
123 */ 126 */
diff --git a/src/Window.cc b/src/Window.cc
index a1be00e..ca6ab99 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.cc,v 1.204 2003/07/17 17:56:28 rathnor Exp $ 25// $Id: Window.cc,v 1.205 2003/07/19 11:55:49 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -698,7 +698,8 @@ bool FluxboxWindow::detachClient(WinClient &client) {
698 698
699 removeClient(client); 699 removeClient(client);
700 700
701 client.m_win = screen().createWindow(client); 701 // m_client must be valid as there should be at least one other window
702 // otherwise this wouldn't be here (refer numClients() <= 1 return)
702 m_client->raise(); 703 m_client->raise();
703 setInputFocus(); 704 setInputFocus();
704 return true; 705 return true;
diff --git a/src/Xinerama.hh b/src/Xinerama.hh
index ad4b3c0..8bbd3d1 100644
--- a/src/Xinerama.hh
+++ b/src/Xinerama.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: Xinerama.hh,v 1.3 2003/07/10 11:58:36 fluxgen Exp $ 23// $Id: Xinerama.hh,v 1.4 2003/07/19 11:55:49 rathnor Exp $
24 24
25#ifndef XINERAMA_HH 25#ifndef XINERAMA_HH
26#define XINERAMA_HH 26#define XINERAMA_HH
@@ -42,20 +42,20 @@
42template <typename ItemType> 42template <typename ItemType>
43class XineramaHeadMenuItem : public FbTk::MenuItem { 43class XineramaHeadMenuItem : public FbTk::MenuItem {
44public: 44public:
45 XineramaHeadMenuItem(const char *label, ItemType *object, int headnum, 45 XineramaHeadMenuItem(const char *label, ItemType &object, int headnum,
46 FbTk::RefCount<FbTk::Command> &cmd): 46 FbTk::RefCount<FbTk::Command> &cmd):
47 FbTk::MenuItem(label,cmd), m_object(object), m_headnum(headnum) {} 47 FbTk::MenuItem(label,cmd), m_object(object), m_headnum(headnum) {}
48 XineramaHeadMenuItem(const char *label, ItemType *object, int headnum): 48 XineramaHeadMenuItem(const char *label, ItemType &object, int headnum):
49 FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {} 49 FbTk::MenuItem(label), m_object(object), m_headnum(headnum) {}
50 50
51 bool isEnabled() const { return true; } //m_object->screen().getOnHead(*m_object) != m_headnum; } ; 51 bool isEnabled() const { return m_object.getOnHead() != m_headnum; }
52 void click(int button, int time) { 52 void click(int button, int time) {
53 // m_object->screen().setOnHead(*m_object, m_headnum); 53 m_object.saveOnHead(m_headnum);
54 FbTk::MenuItem::click(button, time); 54 FbTk::MenuItem::click(button, time);
55 } 55 }
56 56
57private: 57private:
58 ItemType *m_object; 58 ItemType &m_object;
59 int m_headnum; 59 int m_headnum;
60}; 60};
61 61
@@ -65,16 +65,16 @@ template <typename ItemType>
65class XineramaHeadMenu : public FbMenu { 65class XineramaHeadMenu : public FbMenu {
66public: 66public:
67 XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, 67 XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl,
68 FbTk::XLayer &layer, ItemType *item); 68 FbTk::XLayer &layer, ItemType &item);
69 69
70private: 70private:
71 ItemType *m_object; 71 ItemType &m_object;
72}; 72};
73 73
74 74
75template <typename ItemType> 75template <typename ItemType>
76XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, 76XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl,
77 FbTk::XLayer &layer, ItemType *item): 77 FbTk::XLayer &layer, ItemType &item):
78 FbMenu(tm, screen.screenNumber(), imgctrl, layer), 78 FbMenu(tm, screen.screenNumber(), imgctrl, layer),
79 m_object(item) 79 m_object(item)
80{ 80{
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 5ce37ab..d4c109c 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.hh,v 1.65 2003/07/18 15:40:55 rathnor Exp $ 25// $Id: fluxbox.hh,v 1.66 2003/07/19 11:55:49 rathnor Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -118,6 +118,8 @@ public:
118 inline int getNumberOfLayers() const { return *m_rc_numlayers; } 118 inline int getNumberOfLayers() const { return *m_rc_numlayers; }
119 119
120 // class to store layer numbers (special Resource type) 120 // class to store layer numbers (special Resource type)
121 // we have a special resource type because we need to be able to name certain layers
122 // a Resource<int> wouldn't allow this
121 class Layer { 123 class Layer {
122 public: 124 public:
123 explicit Layer(int i) : m_num(i) {}; 125 explicit Layer(int i) : m_num(i) {};