diff options
author | fluxgen <fluxgen> | 2004-04-19 22:42:26 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-04-19 22:42:26 (GMT) |
commit | abda1490d862606989664355d35d391eecbe8ffa (patch) | |
tree | 458282f4703760bf8db6074e49820292002057f5 /src | |
parent | 09c0d67fadb098f06c47f925de2308202cb57a92 (diff) | |
download | fluxbox_paul-abda1490d862606989664355d35d391eecbe8ffa.zip fluxbox_paul-abda1490d862606989664355d35d391eecbe8ffa.tar.bz2 |
kde dockapp in systray
Diffstat (limited to 'src')
-rw-r--r-- | src/Slit.cc | 40 | ||||
-rw-r--r-- | src/Slit.hh | 11 |
2 files changed, 10 insertions, 41 deletions
diff --git a/src/Slit.cc b/src/Slit.cc index 08378ed..2ef77c4 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.92 2004/02/20 09:29:06 fluxgen Exp $ | 25 | // $Id: Slit.cc,v 1.93 2004/04/19 22:42:05 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Slit.hh" | 27 | #include "Slit.hh" |
28 | 28 | ||
@@ -487,39 +487,7 @@ void Slit::addClient(Window w) { | |||
487 | XWindowAttributes attrib; | 487 | XWindowAttributes attrib; |
488 | 488 | ||
489 | #ifdef KDE | 489 | #ifdef KDE |
490 | 490 | if (screen().isKdeDockapp(w)) | |
491 | //Check and see if new client is a KDE dock applet | ||
492 | //If so force reasonable size | ||
493 | bool iskdedockapp = false; | ||
494 | Atom ajunk; | ||
495 | int ijunk; | ||
496 | unsigned long *data = 0, uljunk; | ||
497 | |||
498 | // Check if KDE v2.x dock applet | ||
499 | if (XGetWindowProperty(disp, w, | ||
500 | m_kwm2_dockwindow, 0l, 1l, False, | ||
501 | m_kwm2_dockwindow, | ||
502 | &ajunk, &ijunk, &uljunk, &uljunk, | ||
503 | (unsigned char **) &data) == Success && data) { | ||
504 | iskdedockapp = (data && data[0] != 0); | ||
505 | XFree((void *) data); | ||
506 | data = 0; | ||
507 | } | ||
508 | |||
509 | // Check if KDE v1.x dock applet | ||
510 | if (!iskdedockapp) { | ||
511 | if (XGetWindowProperty(disp, w, | ||
512 | m_kwm1_dockwindow, 0l, 1l, False, | ||
513 | m_kwm1_dockwindow, | ||
514 | &ajunk, &ijunk, &uljunk, &uljunk, | ||
515 | (unsigned char **) &data) == Success && data) { | ||
516 | iskdedockapp = (data && data[0] != 0); | ||
517 | XFree((void *) data); | ||
518 | data = 0; | ||
519 | } | ||
520 | } | ||
521 | |||
522 | if (iskdedockapp) | ||
523 | client->resize(24, 24); | 491 | client->resize(24, 24); |
524 | else | 492 | else |
525 | #endif // KDE | 493 | #endif // KDE |
@@ -549,13 +517,13 @@ void Slit::addClient(Window w) { | |||
549 | client->enableEvents(); | 517 | client->enableEvents(); |
550 | 518 | ||
551 | // flush events | 519 | // flush events |
552 | XFlush(disp); | 520 | // XFlush(disp); |
553 | 521 | ||
554 | // add slit client to eventmanager | 522 | // add slit client to eventmanager |
555 | FbTk::EventManager::instance()->add(*this, client->clientWindow()); | 523 | FbTk::EventManager::instance()->add(*this, client->clientWindow()); |
556 | FbTk::EventManager::instance()->add(*this, client->iconWindow()); | 524 | FbTk::EventManager::instance()->add(*this, client->iconWindow()); |
557 | 525 | ||
558 | frame.window.show(); | 526 | // frame.window.show(); |
559 | clearWindow(); | 527 | clearWindow(); |
560 | reconfigure(); | 528 | reconfigure(); |
561 | 529 | ||
diff --git a/src/Slit.hh b/src/Slit.hh index 4209501..70c2ae5 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.38 2003/08/29 10:30:46 fluxgen Exp $ | 25 | /// $Id: Slit.hh,v 1.39 2004/04/19 22:42:26 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef SLIT_HH | 27 | #ifndef SLIT_HH |
28 | #define SLIT_HH | 28 | #define SLIT_HH |
@@ -49,7 +49,7 @@ class Strut; | |||
49 | /// Handles dock apps | 49 | /// Handles dock apps |
50 | class Slit: public FbTk::EventHandler, public FbTk::Observer { | 50 | class Slit: public FbTk::EventHandler, public FbTk::Observer { |
51 | public: | 51 | public: |
52 | 52 | typedef std::list<SlitClient *> SlitClients; | |
53 | /** | 53 | /** |
54 | Client alignment | 54 | Client alignment |
55 | */ | 55 | */ |
@@ -63,6 +63,8 @@ public: | |||
63 | Slit(BScreen &screen, FbTk::XLayer &layer, const char *filename = 0); | 63 | Slit(BScreen &screen, FbTk::XLayer &layer, const char *filename = 0); |
64 | virtual ~Slit(); | 64 | virtual ~Slit(); |
65 | 65 | ||
66 | void show() { frame.window.show(); } | ||
67 | void hide() { frame.window.hide(); } | ||
66 | void setDirection(Direction dir); | 68 | void setDirection(Direction dir); |
67 | void setPlacement(Placement place); | 69 | void setPlacement(Placement place); |
68 | void setAutoHide(bool val); | 70 | void setAutoHide(bool val); |
@@ -115,7 +117,8 @@ public: | |||
115 | 117 | ||
116 | inline unsigned int width() const { return frame.width; } | 118 | inline unsigned int width() const { return frame.width; } |
117 | inline unsigned int height() const { return frame.height; } | 119 | inline unsigned int height() const { return frame.height; } |
118 | 120 | const SlitClients &clients() const { return m_client_list; } | |
121 | SlitClients &clients() { return m_client_list; } | ||
119 | private: | 122 | private: |
120 | void clearWindow(); | 123 | void clearWindow(); |
121 | void setupMenu(); | 124 | void setupMenu(); |
@@ -131,8 +134,6 @@ private: | |||
131 | BScreen &m_screen; | 134 | BScreen &m_screen; |
132 | FbTk::Timer m_timer; | 135 | FbTk::Timer m_timer; |
133 | 136 | ||
134 | typedef std::list<SlitClient *> SlitClients; | ||
135 | |||
136 | SlitClients m_client_list; | 137 | SlitClients m_client_list; |
137 | FbMenu m_slitmenu, m_placement_menu, m_clientlist_menu; | 138 | FbMenu m_slitmenu, m_placement_menu, m_clientlist_menu; |
138 | std::auto_ptr<LayerMenu<Slit> > m_layermenu; | 139 | std::auto_ptr<LayerMenu<Slit> > m_layermenu; |