gnome using custom tray icon, win10 multiple desktops shadow fix

This commit is contained in:
John Preston 2015-08-02 20:40:44 +03:00
parent b9022ada09
commit c89ee8224c
4 changed files with 8 additions and 4 deletions

View File

@ -28,7 +28,7 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
"lng_open_from_tray" = "Open Telegram"; "lng_open_from_tray" = "Open Telegram";
"lng_minimize_to_tray" = "Minimize to tray"; "lng_minimize_to_tray" = "Minimize to tray";
"lng_quit_from_tray" = "Quit Telegram"; "lng_quit_from_tray" = "Quit Telegram";
"lng_tray_icon_text" = "Telegram is still running here,\nyou can change this from settings page.\n\nIf this icon disappears from tray menu,\nyou can drag it back here from hidden icons."; "lng_tray_icon_text" = "Telegram is still running here,\nyou can change this from settings page.\nIf this icon disappears from tray menu,\nyou can drag it here from hidden icons.";
"lng_month1" = "January"; "lng_month1" = "January";
"lng_month2" = "February"; "lng_month2" = "February";

View File

@ -660,7 +660,7 @@ void Application::checkMapVersion() {
QString versionFeatures; QString versionFeatures;
if (cDevVersion() && Local::oldMapVersion() < 8044) { if (cDevVersion() && Local::oldMapVersion() < 8044) {
versionFeatures = QString::fromUtf8("\xe2\x80\x94 Sending media and recording audio status display");// .replace('@', qsl("@") + QChar(0x200D)); versionFeatures = QString::fromUtf8("\xe2\x80\x94 Sending media and recording audio status display");// .replace('@', qsl("@") + QChar(0x200D));
} else if (!cDevVersion() && Local::oldMapVersion() < 8043) { } else if (!cDevVersion() && Local::oldMapVersion() < 8045) {
versionFeatures = lang(lng_new_version_minor).trimmed(); versionFeatures = lang(lng_new_version_minor).trimmed();
} }
if (!versionFeatures.isEmpty()) { if (!versionFeatures.isEmpty()) {

View File

@ -356,7 +356,7 @@ namespace {
inited = true; inited = true;
QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower();
noQtTrayIcon = (cdesktop == qstr("pantheon"));// || (cdesktop == qstr("gnome")); noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome"));
noTryUnity = (cdesktop != qstr("unity")); noTryUnity = (cdesktop != qstr("unity"));
if (noQtTrayIcon) cSetSupportTray(false); if (noQtTrayIcon) cSetSupportTray(false);

View File

@ -214,7 +214,8 @@ namespace {
if (max_h < st::wndMinHeight) max_h = st::wndMinHeight; if (max_h < st::wndMinHeight) max_h = st::wndMinHeight;
HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0); HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0);
HWND hwnd = Application::wnd() ? Application::wnd()->psHwnd() : 0;
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
QString cn = QString("TelegramShadow%1").arg(i); QString cn = QString("TelegramShadow%1").arg(i);
LPCWSTR _cn = (LPCWSTR)cn.utf16(); LPCWSTR _cn = (LPCWSTR)cn.utf16();
@ -244,6 +245,9 @@ namespace {
destroy(); destroy();
return false; return false;
} }
// if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS8) {
SetWindowLong(hwnds[i], GWL_HWNDPARENT, (LONG)hwnd);
// }
dcs[i] = CreateCompatibleDC(screenDC); dcs[i] = CreateCompatibleDC(screenDC);
if (!dcs[i]) { if (!dcs[i]) {