aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-05-19 14:26:30 (GMT)
committerrathnor <rathnor>2003-05-19 14:26:30 (GMT)
commitcc9c7960c1c5413002c3a6c456650e59ee1ff501 (patch)
treedb11494b3cbd61619229328b722f2c47c6b0a916 /src/Screen.hh
parent68e9677bbb9ebe8f7c1a5edea25f236c09ed3460 (diff)
downloadfluxbox-cc9c7960c1c5413002c3a6c456650e59ee1ff501.zip
fluxbox-cc9c7960c1c5413002c3a6c456650e59ee1ff501.tar.bz2
add back some xinerama support (toolbar, slit (+menu), screen)
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh48
1 files changed, 42 insertions, 6 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index d06937b..f5585c7 100644
--- a/src/Screen.hh
+++ b/src/Screen.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: Screen.hh,v 1.99 2003/05/18 22:00:04 fluxgen Exp $ 25// $Id: Screen.hh,v 1.100 2003/05/19 14:26:30 rathnor Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -116,8 +116,8 @@ public:
116 inline void saveSlitDirection(Slit::Direction d) { resource.slit_direction = d; } 116 inline void saveSlitDirection(Slit::Direction d) { resource.slit_direction = d; }
117 inline void saveSlitAutoHide(bool t) { resource.slit_auto_hide = t; } 117 inline void saveSlitAutoHide(bool t) { resource.slit_auto_hide = t; }
118 118
119 inline unsigned int getSlitOnHead() const { return resource.slit_on_head; } 119 inline int getSlitOnHead() const { return *resource.slit_on_head; }
120 inline void saveSlitOnHead(unsigned int h) { resource.slit_on_head = h; } 120 inline void saveSlitOnHead(int h) { *resource.slit_on_head = h; }
121 121
122 inline const Toolbar *toolbar() const { return m_toolbarhandler->getToolbar(); } 122 inline const Toolbar *toolbar() const { return m_toolbarhandler->getToolbar(); }
123 inline Toolbar *toolbar() { return m_toolbarhandler->getToolbar(); } 123 inline Toolbar *toolbar() { return m_toolbarhandler->getToolbar(); }
@@ -296,6 +296,29 @@ public:
296 /// (and maximized windows?) 296 /// (and maximized windows?)
297 void updateSize(); 297 void updateSize();
298 298
299#ifdef XINERAMA
300 // Xinerama-related functions
301 inline bool hasXinerama() const { return m_xinerama_avail; }
302 inline int numHeads() const { return m_xinerama_num_heads; }
303
304 void initXinerama(Display *display);
305
306 int getHead(int x, int y) const;
307 int getCurrHead() const;
308 int getHeadX(int head) const;
309 int getHeadY(int head) const;
310 int getHeadWidth(int head) const;
311 int getHeadHeight(int head) const;
312
313 // magic to allow us to have "on head" placement without
314 // the object really knowing about it.
315 template <typename OnHeadObject>
316 int getOnHead(OnHeadObject &obj);
317
318 template <typename OnHeadObject>
319 void setOnHead(OnHeadObject &obj, int head);
320#endif // XINERAMA
321
299 // notify netizens 322 // notify netizens
300 void updateNetizenCurrentWorkspace(); 323 void updateNetizenCurrentWorkspace();
301 void updateNetizenWorkspaceCount(); 324 void updateNetizenWorkspaceCount();
@@ -412,9 +435,7 @@ private:
412 FbTk::Resource<bool> slit_auto_hide; 435 FbTk::Resource<bool> slit_auto_hide;
413 FbTk::Resource<Slit::Placement> slit_placement; 436 FbTk::Resource<Slit::Placement> slit_placement;
414 FbTk::Resource<Slit::Direction> slit_direction; 437 FbTk::Resource<Slit::Direction> slit_direction;
415 FbTk::Resource<int> slit_alpha; 438 FbTk::Resource<int> slit_alpha, slit_on_head;
416
417 unsigned int slit_on_head;
418 439
419 std::string strftime_format; 440 std::string strftime_format;
420 441
@@ -425,6 +446,21 @@ private:
425 } resource; 446 } resource;
426 447
427 std::auto_ptr<ToolbarHandler> m_toolbarhandler; 448 std::auto_ptr<ToolbarHandler> m_toolbarhandler;
449
450#ifdef XINERAMA
451 // Xinerama related private data
452 bool m_xinerama_avail;
453 int m_xinerama_num_heads;
454
455 int m_xinerama_center_x, m_xinerama_center_y;
456
457 struct XineramaHeadInfo {
458 int x, y, width, height;
459 } *m_xinerama_headinfo;
460
461
462
463#endif
428}; 464};
429 465
430 466