mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
correct desktop indices for main widget
This commit is contained in:
parent
88f70c0ea6
commit
0565d3533f
@ -46,13 +46,14 @@ QVariant DesktopSource::data(const QString &_source)
|
||||
{
|
||||
qCDebug(LOG_ESS) << "Source" << _source;
|
||||
|
||||
auto increment = KWindowSystem::isPlatformX11() ? 0 : 1;
|
||||
auto current = m_vdi->position(m_vdi->currentDesktop()) + increment;
|
||||
auto nativeIndex = m_vdi->position(m_vdi->currentDesktop());
|
||||
auto decrement = KWindowSystem::isPlatformX11() ? 1 : 0;
|
||||
auto current = nativeIndex - decrement;
|
||||
|
||||
if (_source == "desktop/current/name") {
|
||||
return m_vdi->desktopNames().at(current);
|
||||
} else if (_source == "desktop/current/number") {
|
||||
return current;
|
||||
return current + 1;
|
||||
} else if (_source == "desktop/total/name") {
|
||||
return m_vdi->desktopNames();
|
||||
} else if (_source == "desktop/total/number") {
|
||||
|
Loading…
Reference in New Issue
Block a user