mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-07 14:14:10 +08:00
added screen locking support to win32. added support for
resolution changing (only semi-supported on X because that has no means for resizing screen anyway). also fixed some clipboard problems on win32.
This commit is contained in:
@@ -315,6 +315,23 @@ void CMSWindowsSecondaryScreen::grabClipboard(ClipboardID id)
|
||||
}
|
||||
}
|
||||
|
||||
void CMSWindowsSecondaryScreen::getMousePos(
|
||||
SInt32* x, SInt32* y) const
|
||||
{
|
||||
assert(x != NULL);
|
||||
assert(y != NULL);
|
||||
|
||||
POINT pos;
|
||||
if (GetCursorPos(&pos)) {
|
||||
*x = pos.x;
|
||||
*y = pos.y;
|
||||
}
|
||||
else {
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void CMSWindowsSecondaryScreen::getSize(
|
||||
SInt32* width, SInt32* height) const
|
||||
{
|
||||
@@ -420,6 +437,12 @@ LRESULT CMSWindowsSecondaryScreen::onEvent(
|
||||
else
|
||||
SendMessage(m_nextClipboardWindow, msg, wParam, lParam);
|
||||
return 0;
|
||||
|
||||
case WM_DISPLAYCHANGE:
|
||||
// screen resolution has changed
|
||||
updateScreenSize();
|
||||
m_client->onResolutionChanged();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return DefWindowProc(hwnd, msg, wParam, lParam);
|
||||
|
||||
Reference in New Issue
Block a user