refactor: Server, reorder private member vars to avoid un unessary padding
This commit is contained in:
parent
c3f2c04a28
commit
2990a1f686
1 changed files with 45 additions and 38 deletions
|
|
@ -356,12 +356,40 @@ private:
|
||||||
std::string m_clipboardOwner;
|
std::string m_clipboardOwner;
|
||||||
uint32_t m_clipboardSeqNum = 0;
|
uint32_t m_clipboardSeqNum = 0;
|
||||||
};
|
};
|
||||||
|
// Order suggested by clang
|
||||||
|
|
||||||
// used in hello message sent to the client
|
// the Primary Screen Client
|
||||||
NetworkProtocol m_protocol = NetworkProtocol::Barrier;
|
PrimaryClient *m_primaryClient = nullptr;
|
||||||
|
|
||||||
// the primary screen client
|
// the client with focus
|
||||||
PrimaryClient *m_primaryClient;
|
BaseClientProxy *m_active = nullptr;
|
||||||
|
|
||||||
|
// current configuration
|
||||||
|
ServerConfig *m_config = nullptr;
|
||||||
|
|
||||||
|
// input filter (from m_config);
|
||||||
|
InputFilter *m_inputFilter = nullptr;
|
||||||
|
|
||||||
|
// state saved when screen saver activates
|
||||||
|
BaseClientProxy *m_activeSaver = nullptr;
|
||||||
|
|
||||||
|
BaseClientProxy *m_switchScreen = nullptr;
|
||||||
|
double m_switchWaitDelay = 0.0;
|
||||||
|
EventQueueTimer *m_switchWaitTimer = nullptr;
|
||||||
|
|
||||||
|
// delay for double-tap screen switching
|
||||||
|
double m_switchTwoTapDelay = 0.0;
|
||||||
|
|
||||||
|
// server screen
|
||||||
|
deskflow::Screen *m_screen;
|
||||||
|
|
||||||
|
IEventQueue *m_events = nullptr;
|
||||||
|
size_t m_maximumClipboardSize = INT_MAX;
|
||||||
|
ClientListener *m_clientListener = nullptr;
|
||||||
|
Stopwatch m_switchTwoTapTimer;
|
||||||
|
|
||||||
|
// Name of screen broadcasting the keyboard events
|
||||||
|
std::string m_keyboardBroadcastingScreens;
|
||||||
|
|
||||||
// all clients (including the primary client) indexed by name
|
// all clients (including the primary client) indexed by name
|
||||||
using ClientList = std::map<std::string, BaseClientProxy *>;
|
using ClientList = std::map<std::string, BaseClientProxy *>;
|
||||||
|
|
@ -373,8 +401,13 @@ private:
|
||||||
using OldClients = std::map<BaseClientProxy *, EventQueueTimer *>;
|
using OldClients = std::map<BaseClientProxy *, EventQueueTimer *>;
|
||||||
OldClients m_oldClients;
|
OldClients m_oldClients;
|
||||||
|
|
||||||
// the client with focus
|
deskflow::ServerArgs m_args;
|
||||||
BaseClientProxy *m_active;
|
|
||||||
|
// clipboard cache
|
||||||
|
ClipboardInfo m_clipboards[kClipboardEnd];
|
||||||
|
|
||||||
|
// used in hello message sent to the client
|
||||||
|
NetworkProtocol m_protocol = NetworkProtocol::Barrier;
|
||||||
|
|
||||||
// the sequence number of enter messages
|
// the sequence number of enter messages
|
||||||
uint32_t m_seqNum = 0;
|
uint32_t m_seqNum = 0;
|
||||||
|
|
@ -393,37 +426,21 @@ private:
|
||||||
int32_t m_xDelta2 = 0;
|
int32_t m_xDelta2 = 0;
|
||||||
int32_t m_yDelta2 = 0;
|
int32_t m_yDelta2 = 0;
|
||||||
|
|
||||||
// current configuration
|
|
||||||
ServerConfig *m_config;
|
|
||||||
|
|
||||||
// input filter (from m_config);
|
|
||||||
InputFilter *m_inputFilter;
|
|
||||||
|
|
||||||
// clipboard cache
|
|
||||||
ClipboardInfo m_clipboards[kClipboardEnd];
|
|
||||||
|
|
||||||
// state saved when screen saver activates
|
|
||||||
BaseClientProxy *m_activeSaver = nullptr;
|
|
||||||
int32_t m_xSaver;
|
int32_t m_xSaver;
|
||||||
int32_t m_ySaver;
|
int32_t m_ySaver;
|
||||||
|
|
||||||
|
// state for delayed screen switching
|
||||||
|
int32_t m_switchWaitX;
|
||||||
|
int32_t m_switchWaitY;
|
||||||
|
|
||||||
|
int32_t m_switchTwoTapZone = 3;
|
||||||
|
|
||||||
// common state for screen switch tests. all tests are always
|
// common state for screen switch tests. all tests are always
|
||||||
// trying to reach the same screen in the same direction.
|
// trying to reach the same screen in the same direction.
|
||||||
Direction m_switchDir = Direction::NoDirection;
|
Direction m_switchDir = Direction::NoDirection;
|
||||||
BaseClientProxy *m_switchScreen = nullptr;
|
|
||||||
|
|
||||||
// state for delayed screen switching
|
|
||||||
double m_switchWaitDelay = 0.0;
|
|
||||||
EventQueueTimer *m_switchWaitTimer = nullptr;
|
|
||||||
int32_t m_switchWaitX;
|
|
||||||
int32_t m_switchWaitY;
|
|
||||||
|
|
||||||
// state for double-tap screen switching
|
|
||||||
double m_switchTwoTapDelay = 0.0;
|
|
||||||
Stopwatch m_switchTwoTapTimer;
|
|
||||||
bool m_switchTwoTapEngaged = false;
|
bool m_switchTwoTapEngaged = false;
|
||||||
bool m_switchTwoTapArmed = false;
|
bool m_switchTwoTapArmed = false;
|
||||||
int32_t m_switchTwoTapZone = 3;
|
|
||||||
|
|
||||||
// modifiers needed before switching
|
// modifiers needed before switching
|
||||||
bool m_switchNeedsShift = false;
|
bool m_switchNeedsShift = false;
|
||||||
|
|
@ -436,20 +453,10 @@ private:
|
||||||
// flag whether or not we have broadcasting enabled and the screens to
|
// flag whether or not we have broadcasting enabled and the screens to
|
||||||
// which we should send broadcasted keys.
|
// which we should send broadcasted keys.
|
||||||
bool m_keyboardBroadcasting = false;
|
bool m_keyboardBroadcasting = false;
|
||||||
std::string m_keyboardBroadcastingScreens;
|
|
||||||
|
|
||||||
// screen locking (former scroll lock)
|
// screen locking (former scroll lock)
|
||||||
bool m_lockedToScreen = false;
|
bool m_lockedToScreen = false;
|
||||||
|
|
||||||
// server screen
|
|
||||||
deskflow::Screen *m_screen;
|
|
||||||
|
|
||||||
IEventQueue *m_events;
|
|
||||||
|
|
||||||
bool m_disableLockToScreen = false;
|
bool m_disableLockToScreen = false;
|
||||||
bool m_enableClipboard = true;
|
bool m_enableClipboard = true;
|
||||||
size_t m_maximumClipboardSize = INT_MAX;
|
|
||||||
|
|
||||||
ClientListener *m_clientListener;
|
|
||||||
deskflow::ServerArgs m_args;
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue