diff --git a/src/dialogsettings.cpp b/src/dialogsettings.cpp index 31fa62c7..ee3c39cf 100644 --- a/src/dialogsettings.cpp +++ b/src/dialogsettings.cpp @@ -80,6 +80,7 @@ DialogSettings::DialogSettings( QWidget *parent) onlyShowIconOnNewMail->setChecked(settings->onlyShowIconOnUnreadMessages); leProcessRunOnCountChange->setText( settings->mProcessRunOnCountChange ); boxIgnoreEmailsOnMinimize->setChecked(settings->mForceIgnoreUnreadEmailsOnMinimize); + boxSupportNonNetwmCompliant->setChecked( settings->mIgnoreNETWMhints ); if ( settings->mIndexFilesRereadIntervalSec > 0 ) { @@ -170,6 +171,7 @@ void DialogSettings::accept() settings->ignoreStartUnreadCount = ignoreStartupMailCountBox->isChecked(); settings->onlyShowIconOnUnreadMessages = onlyShowIconOnNewMail->isChecked(); settings->mProcessRunOnCountChange = leProcessRunOnCountChange->text(); + settings->mIgnoreNETWMhints = boxSupportNonNetwmCompliant->isChecked(); settings->setNotificationIcon(btnNotificationIcon->icon().pixmap( settings->mIconSize )); diff --git a/src/dialogsettings.ui b/src/dialogsettings.ui index 618600a4..a8e1e25c 100644 --- a/src/dialogsettings.ui +++ b/src/dialogsettings.ui @@ -21,7 +21,7 @@ - 2 + 4 false @@ -786,11 +786,25 @@ - - - When blinking, use the fade-in/fade-out transition (increases CPU use!) - - + + + + + When blinking, use the fade-in/fade-out transition (increases CPU use!) + + + + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + + Support non-NETWM compliant WMs + + + + diff --git a/src/settings.cpp b/src/settings.cpp index 1006f7b7..ee668408 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -68,6 +68,7 @@ Settings::Settings() mIndexFilesRereadIntervalSec = 0; mThunderbirdCmdLine = Utils::getDefaultThunderbirdCommand(); mForceIgnoreUnreadEmailsOnMinimize = false; + mIgnoreNETWMhints = false; } Settings::~Settings() @@ -111,6 +112,7 @@ void Settings::save() out[ ONLY_SHOW_ICON_ON_UNREAD_MESSAGES_KEY ] = onlyShowIconOnUnreadMessages; out[ "advanced/forcedRereadInterval" ] = static_cast( mIndexFilesRereadIntervalSec ); out[ "advanced/runProcessOnChange" ] = mProcessRunOnCountChange; + out[ "advanced/ignoreNetWMhints" ] = mIgnoreNETWMhints; // Store the account map QJsonArray accounts; @@ -244,6 +246,7 @@ void Settings::fromJSON( const QJsonObject& settings ) mIgnoreUpdateVersion = settings.value("advanced/ignoreUpdateVersion").toString(); mIndexFilesRereadIntervalSec = settings.value("advanced/forcedRereadInterval").toInt(); mProcessRunOnCountChange = settings.value( "advanced/runProcessOnChange" ).toString(); + mIgnoreNETWMhints = settings.value( "advanced/ignoreNetWMhints").toBool(); QStringList thunderbirdCommand = settings.value("advanced/tbcmdline").toVariant().toStringList(); if ( !thunderbirdCommand.isEmpty() && !thunderbirdCommand[0].isEmpty() ) diff --git a/src/settings.h b/src/settings.h index bd1cc155..654a4147 100644 --- a/src/settings.h +++ b/src/settings.h @@ -142,6 +142,9 @@ class Settings // When the number of unread emails changes, Birdtray can start this process QString mProcessRunOnCountChange; + // Whether to support non-compliant NetWM WMs by ignoring NETWM hints + bool mIgnoreNETWMhints; + // Load and save them void save(); void load(); diff --git a/src/translations/main_de.ts b/src/translations/main_de.ts index c5e7e268..74ab3e8c 100644 --- a/src/translations/main_de.ts +++ b/src/translations/main_de.ts @@ -488,6 +488,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Nach einer neuen Version von Birdtray suchen. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_en.ts b/src/translations/main_en.ts index 0fe7bb5c..e20d2423 100644 --- a/src/translations/main_en.ts +++ b/src/translations/main_en.ts @@ -469,6 +469,14 @@ p, li { white-space: pre-wrap; } <html><head/><body><p>If not empty, this command will be invoked every time the unread counter changes (including when it becomes zero). It is invoked via shell, as-is, with %NEW% replaced by the new unread count value and %OLD% replaced with the old unread count value (which may be the same as new).</p><p>Most users don't need this functionality and should leave it empty.</p></body></html> + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_es.ts b/src/translations/main_es.ts index 8e640ecb..acf06769 100644 --- a/src/translations/main_es.ts +++ b/src/translations/main_es.ts @@ -487,6 +487,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Comprobar si existe una nueva versión de Birdtray. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_it.ts b/src/translations/main_it.ts index 6047fced..d5f5d4ff 100644 --- a/src/translations/main_it.ts +++ b/src/translations/main_it.ts @@ -487,6 +487,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Cerca una nuova versione di Birdtray. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_nl.ts b/src/translations/main_nl.ts index 7f8d9239..cf052545 100644 --- a/src/translations/main_nl.ts +++ b/src/translations/main_nl.ts @@ -489,6 +489,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Controleer of er een nieuwe Birdtray-versie beschikbaar is. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_pl.ts b/src/translations/main_pl.ts index ef074dab..390f25db 100644 --- a/src/translations/main_pl.ts +++ b/src/translations/main_pl.ts @@ -487,6 +487,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Sprawdź, czy dostępne sa nowe wersje Birdtray. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_pt.ts b/src/translations/main_pt.ts index cf7d0f08..5628e4b7 100644 --- a/src/translations/main_pt.ts +++ b/src/translations/main_pt.ts @@ -487,6 +487,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Verificar nova versão do Birdtray. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_ru.ts b/src/translations/main_ru.ts index e93f43a9..47fc1abf 100644 --- a/src/translations/main_ru.ts +++ b/src/translations/main_ru.ts @@ -487,6 +487,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Проверка новой версии Birdtray. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_sv.ts b/src/translations/main_sv.ts index e72b93b9..a7b75b7d 100644 --- a/src/translations/main_sv.ts +++ b/src/translations/main_sv.ts @@ -487,6 +487,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Sök efter ny Birdtray-version. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/translations/main_tr.ts b/src/translations/main_tr.ts index 21fc1e0b..7df95525 100644 --- a/src/translations/main_tr.ts +++ b/src/translations/main_tr.ts @@ -474,6 +474,14 @@ p, li { white-space: pre-wrap; } Check for a new Birdtray version. Yeni Birdtray sürümünü kontrol edin. + + Support non-NETWM compliant WMs + + + + <html><head/><body><p>If your desktop manager is not fully NETWM compliant, you may need to check this checkbox so it can detect Thunderbird window and is able to minimise and hide it.</p></body></html> + + Log diff --git a/src/windowtools_x11.cpp b/src/windowtools_x11.cpp index 44d40824..c526ea87 100644 --- a/src/windowtools_x11.cpp +++ b/src/windowtools_x11.cpp @@ -373,7 +373,7 @@ bool WindowTools_X11::lookup() if ( isValid() ) return true; - mWinId = findWindow(QX11Info::display(), QX11Info::appRootWindow(), true, + mWinId = findWindow(QX11Info::display(), QX11Info::appRootWindow(), ! BirdtrayApp::get()->getSettings()->mIgnoreNETWMhints, BirdtrayApp::get()->getSettings()->mThunderbirdWindowMatch); Log::debug("Window ID found: %lX", mWinId );