1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 19:45:31 +01:00

On Windows, don't activate the pretty OSD when it is first shown and

don't show it in the taskbar.
This commit is contained in:
David Sansome 2012-07-15 13:44:42 +01:00
parent ed5b1d787b
commit df25f6291f

View File

@ -38,6 +38,7 @@
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
# include "qtwin.h" # include "qtwin.h"
# include <windows.h>
#endif #endif
const char* OSDPretty::kSettingsGroup = "OSDPretty"; const char* OSDPretty::kSettingsGroup = "OSDPretty";
@ -72,8 +73,17 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent)
setWindowFlags(flags); setWindowFlags(flags);
setAttribute(Qt::WA_TranslucentBackground, true); setAttribute(Qt::WA_TranslucentBackground, true);
setAttribute(Qt::WA_X11NetWmWindowTypeNotification, true); setAttribute(Qt::WA_X11NetWmWindowTypeNotification, true);
setAttribute(Qt::WA_ShowWithoutActivating, true);
ui_->setupUi(this); ui_->setupUi(this);
#ifdef Q_OS_WIN32
// Don't show the window in the taskbar. Qt::ToolTip does this too, but it
// adds an extra ugly shadow.
int ex_style = GetWindowLong(winId(), GWL_EXSTYLE);
ex_style |= WS_EX_NOACTIVATE;
SetWindowLong(winId(), GWL_EXSTYLE, ex_style);
#endif
// Mode settings // Mode settings
switch (mode_) { switch (mode_) {
case Mode_Popup: case Mode_Popup: