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:
parent
ed5b1d787b
commit
df25f6291f
@ -38,6 +38,7 @@
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
# include "qtwin.h"
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
const char* OSDPretty::kSettingsGroup = "OSDPretty";
|
||||
@ -72,8 +73,17 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent)
|
||||
setWindowFlags(flags);
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setAttribute(Qt::WA_X11NetWmWindowTypeNotification, true);
|
||||
setAttribute(Qt::WA_ShowWithoutActivating, true);
|
||||
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
|
||||
switch (mode_) {
|
||||
case Mode_Popup:
|
||||
|
Loading…
x
Reference in New Issue
Block a user