Don't show the tasklist arrows when taskbar is autohide (#340)

Ref: https://github.com/microsoft/PowerToys/issues/291
This commit is contained in:
Bartosz Sosnowski 2019-09-11 12:38:58 +02:00 committed by GitHub
parent 1737128b1d
commit 7aeac4996b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,10 +228,15 @@ void D2DOverlayWindow::show(HWND active_window) {
lock.unlock();
D2DWindow::show(primary_screen.left(), primary_screen.top(), primary_screen.width(), primary_screen.height());
key_pressed.clear();
tasklist_cv_mutex.lock();
tasklist_update = true;
tasklist_cv_mutex.unlock();
tasklist_cv.notify_one();
// Check if taskbar is auto-hidden. If so, don't display the number arrows
APPBARDATA param = {};
param.cbSize = sizeof(APPBARDATA);
if ((UINT)SHAppBarMessage(ABM_GETSTATE, &param) != ABS_AUTOHIDE) {
tasklist_cv_mutex.lock();
tasklist_update = true;
tasklist_cv_mutex.unlock();
tasklist_cv.notify_one();
}
Trace::EventShow();
}