Fix overlay counter on taskbar when native decorations are enabled (#47)
This commit is contained in:
parent
8ce21aa87f
commit
7de92734cd
2 changed files with 11 additions and 10 deletions
|
|
@ -633,20 +633,19 @@ UINT MainWindow::_taskbarCreatedMsgId = 0;
|
|||
MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||
: Window::MainWindow(controller)
|
||||
, ps_tbHider_hWnd(createTaskbarHider()) {
|
||||
if (!UseNativeDecorations()) {
|
||||
QCoreApplication::instance()->installNativeEventFilter(
|
||||
EventFilter::CreateInstance(this));
|
||||
QCoreApplication::instance()->installNativeEventFilter(
|
||||
EventFilter::CreateInstance(this));
|
||||
|
||||
if (!_taskbarCreatedMsgId) {
|
||||
_taskbarCreatedMsgId = RegisterWindowMessage(L"TaskbarButtonCreated");
|
||||
}
|
||||
if (!UseNativeDecorations()) {
|
||||
subscribe(Window::Theme::Background(), [this](const Window::Theme::BackgroundUpdate &update) {
|
||||
if (update.paletteChanged()) {
|
||||
_psShadowWindows.setColor(st::windowShadowFg->c);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!_taskbarCreatedMsgId) {
|
||||
_taskbarCreatedMsgId = RegisterWindowMessage(L"TaskbarButtonCreated");
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::TaskbarCreated() {
|
||||
|
|
@ -1008,9 +1007,7 @@ MainWindow::~MainWindow() {
|
|||
}
|
||||
if (ps_tbHider_hWnd) DestroyWindow(ps_tbHider_hWnd);
|
||||
|
||||
if (!UseNativeDecorations()) {
|
||||
EventFilter::Destroy();
|
||||
}
|
||||
EventFilter::Destroy();
|
||||
}
|
||||
|
||||
} // namespace Platform
|
||||
|
|
|
|||
|
|
@ -92,6 +92,10 @@ bool EventFilter::mainWindowEvent(
|
|||
}
|
||||
}
|
||||
|
||||
if (UseNativeDecorations()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (msg) {
|
||||
|
||||
case WM_TIMECHANGE: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue