diff options
author | Blase Stanek <[email protected]> | 2007-10-21 09:39:08 +0000 |
---|---|---|
committer | Alexander Golubev <[email protected]> | 2019-03-02 18:35:48 +0300 |
commit | 6f27ee389febd8f052b6908cb4d8f24b008863ed (patch) | |
tree | c21c9bfb22cd31c5715324f6ccb90e24f6bba906 /src | |
parent | d17c0cd88e1f867d796714bab4cc93cf19928f3a (diff) | |
download | kooldock-6f27ee389febd8f052b6908cb4d8f24b008863ed.tar.gz kooldock-6f27ee389febd8f052b6908cb4d8f24b008863ed.zip |
Bugfix 2
git-svn-id: https://svn.code.sf.net/p/kooldock/code@57 9f32970d-5c29-0410-a1d8-a3be4640426c
Signed-off-by: Alexander Golubev <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/kooldock.cpp | 18 | ||||
-rw-r--r-- | src/kooldock.h | 1 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/kooldock.cpp b/src/kooldock.cpp index ce77058..e8d13e2 100644 --- a/src/kooldock.cpp +++ b/src/kooldock.cpp @@ -1613,8 +1613,8 @@ void KoolDock::currentDesktopChanged(int) if (initialization) { return; } - funcH = iwBig2 - iwSmall; - iwBig = iwBig2; + //funcH = iwBig2 - iwSmall; + //iwBig = iwBig2; addWindows(); doUpdateGeometry(); move(0, rdh); @@ -1695,6 +1695,12 @@ void KoolDock::windowRemoved(WId id) doUpdateGeometry(); } +void KoolDock::numberOfDesktopsChanged(int /*num*/) +{ + if (initialization) return; + if (fShowTaskbar || fShowNav) addWindows(); +} + void KoolDock::windowChanged(WId id, unsigned int properties) { if (initialization) { @@ -3310,6 +3316,7 @@ void KoolDock::menuX(int num) void KoolDock::init1() { initialization = true; + nDesks=-1; ptPart = 5; // Load the configuration loadConf(); @@ -3426,6 +3433,7 @@ void KoolDock::init1() // Acquire system tray XSetSelectionOwner(display, net_system_tray_selection, winId(), CurrentTime); } + connect(wm, SIGNAL(numberOfDesktopsChanged(int)), SLOT(numberOfDesktopsChanged(int))); connect(wm, SIGNAL(currentDesktopChanged(int)), SLOT(currentDesktopChanged(int))); connect(wm, SIGNAL(workAreaChanged()), SLOT(workAreaChanged())); @@ -3873,11 +3881,11 @@ void KoolDock::updTaskList() void KoolDock::addToTaskList(WId id) { + if (!fShowNav || nDesks<0) return; int i; Item* item; int index, rIndex, j, incr = 0, decr = 0; KWin::WindowInfo tmpinfo = KWin::windowInfo(id); - nDesks = KWin::numberOfDesktops(); rIndex = tmpinfo.desktop(); const int SUPPORTED_WINDOW_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask | @@ -3933,7 +3941,9 @@ void KoolDock::addToTaskList(WId id) void KoolDock::rmFromTaskList(WId id) { - nDesks = KWin::numberOfDesktops(); + if (!fShowNav || nDesks<0) { + return; + } int i, j, k, dec=0; unsigned int index = 0; i = tasklist->indexOf(id); diff --git a/src/kooldock.h b/src/kooldock.h index 9e87d6b..1c6458d 100644 --- a/src/kooldock.h +++ b/src/kooldock.h @@ -291,6 +291,7 @@ class KoolDock : public TQWidget void about(); void windowAdded(WId id); void windowRemoved(WId id); + void numberOfDesktopsChanged(int); void windowChanged(WId id, unsigned int properties); void activeWindowChanged(WId id); void workAreaChanged(); |