summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kooldock.cpp18
-rw-r--r--src/kooldock.h1
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();