mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
add logging to hide/show window and shift press (#8392)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <common/common.h>
|
||||
#include <common/dpi_aware.h>
|
||||
#include <common/logger/logger.h>
|
||||
#include <common/on_thread_executor.h>
|
||||
#include <common/window_helpers.h>
|
||||
|
||||
@@ -534,6 +535,9 @@ FancyZones::OnKeyDown(PKBDLLHOOKSTRUCT info) noexcept
|
||||
bool const win = GetAsyncKeyState(VK_LWIN) & 0x8000 || GetAsyncKeyState(VK_RWIN) & 0x8000;
|
||||
bool const alt = GetAsyncKeyState(VK_MENU) & 0x8000;
|
||||
bool const ctrl = GetAsyncKeyState(VK_CONTROL) & 0x8000;
|
||||
|
||||
Logger::trace("OnKeyDown: shift {}", shift);
|
||||
|
||||
if ((win && !shift && !ctrl) || (win && ctrl && alt))
|
||||
{
|
||||
// Temporarily disable Win+Ctrl+Number functionality
|
||||
@@ -570,8 +574,10 @@ FancyZones::OnKeyDown(PKBDLLHOOKSTRUCT info) noexcept
|
||||
|
||||
if (m_windowMoveHandler.IsDragEnabled() && shift)
|
||||
{
|
||||
Logger::trace("OnKeyDown: drag enabled -> return true");
|
||||
return true;
|
||||
}
|
||||
Logger::trace("OnKeyDown: return false");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include <common/common.h>
|
||||
#include <common/logger/logger.h>
|
||||
#include <common/on_thread_executor.h>
|
||||
|
||||
#include "FancyZonesData.h"
|
||||
@@ -318,9 +319,11 @@ ZoneWindow::SaveWindowProcessToZoneIndex(HWND window) noexcept
|
||||
IFACEMETHODIMP_(void)
|
||||
ZoneWindow::ShowZoneWindow() noexcept
|
||||
{
|
||||
Logger::trace("ShowZoneWindow: Enter");
|
||||
auto window = m_window.get();
|
||||
if (!window)
|
||||
{
|
||||
Logger::trace("ShowZoneWindow: no window");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -342,11 +345,16 @@ ZoneWindow::HideZoneWindow() noexcept
|
||||
{
|
||||
if (m_window)
|
||||
{
|
||||
Logger::trace("HideZoneWindow: hiding");
|
||||
m_zoneWindowDrawing->Hide();
|
||||
m_keyLast = 0;
|
||||
m_windowMoveSize = nullptr;
|
||||
m_highlightZone = {};
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::trace("HideZoneWindow: no window");
|
||||
}
|
||||
}
|
||||
|
||||
IFACEMETHODIMP_(void)
|
||||
|
||||
Reference in New Issue
Block a user