mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-05 06:49:10 +08:00
Indentation changes.
This commit is contained in:
@@ -13,7 +13,7 @@ class IOutputStream;
|
||||
class ISecondaryScreen;
|
||||
|
||||
class CClient {
|
||||
public:
|
||||
public:
|
||||
CClient(const CString& clientName);
|
||||
~CClient();
|
||||
|
||||
@@ -27,7 +27,7 @@ class CClient {
|
||||
// accessors
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
void runSession(void*);
|
||||
|
||||
// open/close the primary screen
|
||||
@@ -49,7 +49,7 @@ class CClient {
|
||||
void onMouseMove();
|
||||
void onMouseWheel();
|
||||
|
||||
private:
|
||||
private:
|
||||
CMutex m_mutex;
|
||||
CString m_name;
|
||||
IInputStream* m_input;
|
||||
|
||||
@@ -31,14 +31,14 @@ static DWORD s_thread = 0;
|
||||
static BOOL CALLBACK WINAPI debugProc(HWND, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
case WM_INITDIALOG:
|
||||
return TRUE;
|
||||
|
||||
case WM_CLOSE:
|
||||
case WM_CLOSE:
|
||||
PostQuitMessage(0);
|
||||
return TRUE;
|
||||
|
||||
case WM_APP:
|
||||
case WM_APP:
|
||||
if (!s_logMore.empty()) {
|
||||
if (s_log.size() > 20000)
|
||||
s_log = s_logMore;
|
||||
@@ -194,19 +194,19 @@ void CMSWindowsSecondaryScreen::mouseDown(ButtonID button)
|
||||
// map button id to button flag
|
||||
DWORD flags;
|
||||
switch (button) {
|
||||
case kButtonLeft:
|
||||
case kButtonLeft:
|
||||
flags = MOUSEEVENTF_LEFTDOWN;
|
||||
break;
|
||||
|
||||
case kButtonMiddle:
|
||||
case kButtonMiddle:
|
||||
flags = MOUSEEVENTF_MIDDLEDOWN;
|
||||
break;
|
||||
|
||||
case kButtonRight:
|
||||
case kButtonRight:
|
||||
flags = MOUSEEVENTF_RIGHTDOWN;
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -219,19 +219,19 @@ void CMSWindowsSecondaryScreen::mouseUp(ButtonID button)
|
||||
// map button id to button flag
|
||||
DWORD flags;
|
||||
switch (button) {
|
||||
case kButtonLeft:
|
||||
case kButtonLeft:
|
||||
flags = MOUSEEVENTF_LEFTUP;
|
||||
break;
|
||||
|
||||
case kButtonMiddle:
|
||||
case kButtonMiddle:
|
||||
flags = MOUSEEVENTF_MIDDLEUP;
|
||||
break;
|
||||
|
||||
case kButtonRight:
|
||||
case kButtonRight:
|
||||
flags = MOUSEEVENTF_RIGHTUP;
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -361,12 +361,12 @@ LRESULT CMSWindowsSecondaryScreen::onEvent(
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
// FIXME -- handle display changes
|
||||
case WM_PAINT:
|
||||
// FIXME -- handle display changes
|
||||
case WM_PAINT:
|
||||
ValidateRect(hwnd, NULL);
|
||||
return 0;
|
||||
|
||||
case WM_ACTIVATEAPP:
|
||||
case WM_ACTIVATEAPP:
|
||||
if (wParam == FALSE) {
|
||||
// some other app activated. hide the hider window.
|
||||
log((CLOG_INFO "show cursor"));
|
||||
@@ -374,7 +374,7 @@ LRESULT CMSWindowsSecondaryScreen::onEvent(
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DRAWCLIPBOARD:
|
||||
case WM_DRAWCLIPBOARD:
|
||||
log((CLOG_DEBUG "clipboard was taken"));
|
||||
|
||||
// first pass it on
|
||||
@@ -389,7 +389,7 @@ LRESULT CMSWindowsSecondaryScreen::onEvent(
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_CHANGECBCHAIN:
|
||||
case WM_CHANGECBCHAIN:
|
||||
if (m_nextClipboardWindow == (HWND)wParam)
|
||||
m_nextClipboardWindow = (HWND)lParam;
|
||||
else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "ISecondaryScreen.h"
|
||||
|
||||
class CMSWindowsSecondaryScreen : public CMSWindowsScreen, public ISecondaryScreen {
|
||||
public:
|
||||
public:
|
||||
CMSWindowsSecondaryScreen();
|
||||
virtual ~CMSWindowsSecondaryScreen();
|
||||
|
||||
@@ -29,17 +29,17 @@ class CMSWindowsSecondaryScreen : public CMSWindowsScreen, public ISecondaryScre
|
||||
virtual SInt32 getJumpZoneSize() const;
|
||||
virtual void getClipboard(IClipboard*) const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// CMSWindowsScreen overrides
|
||||
virtual bool onPreTranslate(MSG*);
|
||||
virtual LRESULT onEvent(HWND, UINT, WPARAM, LPARAM);
|
||||
virtual void onOpenDisplay();
|
||||
virtual void onCloseDisplay();
|
||||
|
||||
private:
|
||||
private:
|
||||
UINT mapKey(KeyID, KeyModifierMask) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
CClient* m_client;
|
||||
HWND m_window;
|
||||
HWND m_nextClipboardWindow;
|
||||
|
||||
@@ -38,7 +38,7 @@ void CXWindowsSecondaryScreen::run()
|
||||
|
||||
// handle event
|
||||
switch (xevent.type) {
|
||||
case MappingNotify: {
|
||||
case MappingNotify: {
|
||||
// keyboard mapping changed
|
||||
CDisplayLock display(this);
|
||||
XRefreshKeyboardMapping(&xevent.xmapping);
|
||||
@@ -47,17 +47,17 @@ void CXWindowsSecondaryScreen::run()
|
||||
updateModifierMap(display);
|
||||
updateModifiers(display);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case LeaveNotify: {
|
||||
case LeaveNotify: {
|
||||
// mouse moved out of hider window somehow. hide the window.
|
||||
assert(m_window != None);
|
||||
CDisplayLock display(this);
|
||||
XUnmapWindow(display, m_window);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case SelectionClear:
|
||||
case SelectionClear:
|
||||
// we just lost the selection. that means someone else
|
||||
// grabbed the selection so this screen is now the
|
||||
// selection owner. report that to the server.
|
||||
@@ -68,7 +68,7 @@ void CXWindowsSecondaryScreen::run()
|
||||
}
|
||||
break;
|
||||
|
||||
case SelectionNotify:
|
||||
case SelectionNotify:
|
||||
// notification of selection transferred. we shouldn't
|
||||
// get this here because we handle them in the selection
|
||||
// retrieval methods. we'll just delete the property
|
||||
@@ -79,7 +79,7 @@ void CXWindowsSecondaryScreen::run()
|
||||
}
|
||||
break;
|
||||
|
||||
case SelectionRequest:
|
||||
case SelectionRequest:
|
||||
// somebody is asking for clipboard data
|
||||
if (xevent.xselectionrequest.owner == m_window) {
|
||||
addClipboardRequest(m_window,
|
||||
@@ -105,7 +105,7 @@ void CXWindowsSecondaryScreen::run()
|
||||
}
|
||||
break;
|
||||
|
||||
case PropertyNotify:
|
||||
case PropertyNotify:
|
||||
// clipboard transfers involve property changes so forward
|
||||
// the event to the superclass. we only care about the
|
||||
// deletion of properties.
|
||||
@@ -116,7 +116,7 @@ void CXWindowsSecondaryScreen::run()
|
||||
}
|
||||
break;
|
||||
|
||||
case DestroyNotify:
|
||||
case DestroyNotify:
|
||||
// looks like one of the windows that requested a clipboard
|
||||
// transfer has gone bye-bye.
|
||||
destroyClipboardRequest(xevent.xdestroywindow.window);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <vector>
|
||||
|
||||
class CXWindowsSecondaryScreen : public CXWindowsScreen, public ISecondaryScreen {
|
||||
public:
|
||||
public:
|
||||
CXWindowsSecondaryScreen();
|
||||
virtual ~CXWindowsSecondaryScreen();
|
||||
|
||||
@@ -30,13 +30,13 @@ class CXWindowsSecondaryScreen : public CXWindowsScreen, public ISecondaryScreen
|
||||
virtual SInt32 getJumpZoneSize() const;
|
||||
virtual void getClipboard(ClipboardID, IClipboard*) const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// CXWindowsScreen overrides
|
||||
virtual void onOpenDisplay();
|
||||
virtual void onCloseDisplay();
|
||||
virtual long getEventMask(Window) const;
|
||||
|
||||
private:
|
||||
private:
|
||||
struct KeyCodeMask {
|
||||
public:
|
||||
KeyCode keycode;
|
||||
@@ -64,7 +64,7 @@ class CXWindowsSecondaryScreen : public CXWindowsScreen, public ISecondaryScreen
|
||||
void updateModifierMap(Display* display);
|
||||
static bool isToggleKeysym(KeySym);
|
||||
|
||||
private:
|
||||
private:
|
||||
CClient* m_client;
|
||||
Window m_window;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user