Commit graph

637 commits

Author SHA1 Message Date
sithlord48
85d89f9846 refactor: XArch Classes => Arch Exception Classes 2025-08-11 17:14:45 +01:00
sithlord48
e4a9d1eb78 refactor: XScreen Classes => ScreenException Classes 2025-08-11 17:14:45 +01:00
Nick Bolton
a4c0e30bb8 fix: Ignore Mod2 and Mod3 to make log quieter 2025-08-07 15:31:52 -04:00
Peter Hutterer
a5c9744258 fix: Account for more modifiers in the EI keymap calculation
Some modifiers, notably LevelThree, were not accounted for in the
modifier mask calculation. This leads to an incorrect keymap where some
key symbols were listed for keys without (or insufficient) modifiers.
Emulating those keys can then produce the wrong keysyms.

Reproducible with server and client on English(UK) layout and typing
e.g. [. That key has its own key AD11 (right of P) but is also on
the third level of AE08 (the 8 key). When the server sends the keyid 91
(for [) the client looks it up in the pre-generated keymap. It is found
first on the 8 key with no modifiers (because LevelThree was previously
ignored), hence the client simulates a key 8 press without modifiers.
This erroneously produced an 8 instead of the wanted [.

Fix this by ensuring that all modifiers are accounted for in the key
map. This fix is likely incomplete as it does not account for the full
virtual modifier to real modifier mappings possible (e.g. Mod5 *may* be
something other than AltGr) but it does push the can a bit further down
the road, for someone else to release the worms.

Closes: #8168
2025-08-07 15:31:52 -04:00
sithlord48
2a84ef0ebf refactor: update log calls to LOG_... fixes #8819 2025-08-06 16:18:38 +01:00
Nick Bolton
9a9bd7e262 chore: Improve logging for active sides
For the longest time, this log line has bugged me:
```
active sides: e
```

It's hex, but it looks like a bug, since there's no `0x` prefix. Also, most humans can't read hex, so I added a string representation.

New version:
```
[2025-08-06T11:56:00] DEBUG: active sides: LRT (0x0e)
```
2025-08-06 08:38:00 -04:00
sithlord48
0cbc922478 refactor: MSWindowsDesks::getCursorPos initialize pos to 0,0 2025-08-06 11:44:38 +01:00
sithlord48
1f92f2a2ed chore: XWindowsScreen declare vars on seperate lines 2025-08-01 13:03:51 -04:00
sithlord48
023037f7ee refactor: XWindowsClipboard, user std::format_to_n in place of snprintf 2025-08-01 13:03:51 -04:00
sithlord48
c78665dc35 refactor: XWindowsKeyState, updateKeysymMap use std::ranges::fill to fill modifier array 2025-08-01 13:03:51 -04:00
sithlord48
c4c4c09eb2 refactor: XwindowsClipboard , use std::ranges::for_each in sendReply 2025-08-01 13:03:51 -04:00
sithlord48
2cccc3d0c8 refactor: use std::ranges::find_if when possible 2025-08-01 13:03:51 -04:00
Corentin Rossignon
11caf55522 fix: Wrong m_buttons vector size in case of maxButton inferior to numButtons 2025-08-01 08:18:57 -04:00
sithlord48
8977d70dd9 refactor: IClipboard::EFormat => enum class Clipboard::Format 2025-07-31 13:41:29 +01:00
sithlord48
49e36cfdc6 refactor: Event, make non default constructors explicit 2025-07-29 13:41:34 +01:00
sithlord48
283e0c6367 refactor: KeyMap EType => enum class KeyType 2025-07-29 13:41:34 +01:00
Nick Bolton
51e467d45e feat: Enable 'MouseKeys' on screen setup and never restore old settings
Previously we were toggling the 'MouseKeys' Windows accessibility feature on and off, but this was causing many bugs; cursor show delay while Windows brings up the mouse stack(?) and often forever lost mouse cursor when toggling off the 'MouseKeys' feature. After a few days of hacking away at this, it seems safest to just leave it on.
2025-07-28 21:45:05 +01:00
Nick Bolton
e184475a24 feat: Add logging in MSWindowsScreen for setup and cursor centering 2025-07-28 21:45:05 +01:00
Nick Bolton
1fb2789cb1 fix: Prevent flicker on desk leave with 30ms delay 2025-07-28 21:45:05 +01:00
Nick Bolton
8979d7f94f feat: Cursor visibility retry mechanism
The `ShowCursor` function does not directly show/hide the cursor; it increments or decrements the internal display counter. When that counter reaches a certain positive/negative number, then the cursor is shown or hidden at a particular threshold.
2025-07-28 21:45:05 +01:00
Nick Bolton
9033198aed refactor: Change mouse keys functions names to expose actual behavior 2025-07-28 21:45:05 +01:00
Nick Bolton
db55c3f0e7 build: remove unused includes from MSWindowsDesks.cpp|h 2025-07-28 21:45:05 +01:00
sithlord48
d1b810baa5 refactor: use std::size to get size of arrays 2025-07-17 18:47:50 +01:00
sithlord48
f51abad8cc feat: Wayland, only set a side to a border if if has a neighboring screen
move protocolTypes Direction enum to new base/DirectionTypes
use the direction info when calling
fixes #8572
fixes #8452
fixes #8605
fixes #8005
2025-07-14 10:31:50 +01:00
sithlord48
ae5ba4e51f chore: remove dev method PortalInputCapture::fakeEisFd 2025-07-14 10:31:50 +01:00
sithlord48
e37cea2d6b refactor: replace anon Enum in XWindowsKeyState with static vars 2025-07-11 03:06:24 -07:00
sithlord48
181d862838 refactor EiEventQueue remove anon enum for a few static members 2025-07-11 03:06:24 -07:00
sithlord48
b9964b5e90 refactor: remove anon enum in IKeyState and replace with static s_numButtons 2025-07-11 03:06:24 -07:00
sithlord48
422b4c3a23 refactor ClientArgs ClientScrollDirection to enum class use Members Normal and Inverted for names 2025-07-11 03:06:24 -07:00
sithlord48
9905f32738 refactor: Common.h replace anon enum with set constexpr exit codes 2025-07-11 03:06:24 -07:00
sithlord48
3ececbcfd9 refactor: Event anon enum => EventFlags struct 2025-07-11 03:06:24 -07:00
sithlord48
c12aa4c6e9 refactor: Make IEventQueueBuffer Types an enum class, use proper names rename kNone => Unknown to reflect its unknowns an unknown type of event 2025-07-11 03:06:24 -07:00
sithlord48
77bdde5434 refactor: Elevel => LogLevel enum class, use proper names for items in the class 2025-07-11 03:06:24 -07:00
sithlord48
36e985d8ab chore: add missing default for switches 2025-07-07 17:53:56 +01:00
sithlord48
dded2e3711 refactor: ProtocolTypes EDirectionMask => enum class DirectionMask 2025-07-07 17:53:56 +01:00
sithlord48
0ea2576032 refactor: XWindowsEventQueueBuffer, use static const for timeoutd delay 2025-07-07 17:53:56 +01:00
sithlord48
5aa9b1bfd4 refactor: PortalRemoteDesktop, do not create nested pointer in new Thread call 2025-07-07 17:53:56 +01:00
sithlord48
cfbfa88cdc refactor: PortalInputCapture: do not create nested pointer in new Thread call 2025-07-07 17:53:56 +01:00
sithlord48
ede27975d7 chore: clean up remaing sonar warnings to use in class intializers where possible 2025-07-07 17:53:56 +01:00
sithlord48
a175c293f6 chore: comment empty methods that do nothing 2025-07-07 17:53:56 +01:00
sithlord48
ab4fbd1c85 refactor: use using enum EventTypes when possible to reduce verbosity 2025-07-03 03:24:16 +00:00
sithlord48
42cd01efd7 refactor: PortalInputCapture, fix a missed non compliant variable names
refactor: PortalInputCapture, more const args
2025-06-20 18:10:40 +01:00
sithlord48
a7a54ad8a7 refactor: PortalInputCapture use std::map to hold signals and enum class as the key
fixes: InputCapturePortal crash in debug builds
2025-06-20 18:10:40 +01:00
sithlord48
20bc88eb1f refactor: PortalInputCapture sonar adjustments 2025-06-20 12:41:34 +01:00
sithlord48
969b642e0b refactor: EiScreen sonar adjustments 2025-06-20 12:41:34 +01:00
sithlord48
a89f3b6892 refactor: conform EiScreen to code standards
fixes #8700
2025-06-20 12:41:34 +01:00
sithlord48
a973d4277c refactor: conform PortalInputCapture to coding standards 2025-06-20 12:41:34 +01:00
sithlord48
b8124107aa refactor: conform EiKeyState to coding standards 2025-06-20 12:41:34 +01:00
sithlord48
0691d586e7 refactor: conform EiEventQueueBuffer to coding standards 2025-06-20 12:41:34 +01:00
sithlord48
e8c85611a0 refactor: conform PortalRemoteDesktop to naming standards
remove unused method and includes
2025-06-20 12:41:34 +01:00