Commit graph

667 commits

Author SHA1 Message Date
sithlord48
612ca91f9c chore: rename XWindowsPowerManager => XDGPowerManager
fixes: 8949
2025-09-15 13:21:51 +01:00
Nick Bolton
162cb85811 fix: Improve output loop error handling in MSWindowsWatchdog
Prevents high CPU usage while waiting for data (ERROR_NO_DATA)
2025-09-12 13:17:50 +01:00
Louis des Landes
7a2591a1fa fix: wayland sleep inhibit on client
Fixes #8827
Adds the XWindowsPowerManager to the EiScreen as, despite the name, this
works on Wayland as well.
2025-09-12 10:54:25 +01:00
sithlord48
c4c2f7f37f feat: begin to use QStrings for strings
feat: get windows building with the UNICODE forced by using Qt
refactor: remove ARCHString use QString to convert to / from utf8
build: (arch) link to common
build: (base) link to arch
build: (io) Link to common
build: (client) link to common
build: (server) link to common
fix: Append to log file instead of creating a new one each log line
refactor: Trim cipher description for neater log output
fix: Update log messages to use wide string format for Unicode support
fix: Correct event creation to use wide string for Unicode compatibility
refactor: Use QStringDecoder for UTF-8 handling on Windows Daemon child process
fix: Use correct wide type for Win32 consts
2025-09-10 18:15:19 +01:00
sithlord48
b30f8d253c refactor: XWindowsKeyState remove name for unused KeyId in remapKeyModifiers 2025-09-05 11:52:17 +01:00
sithlord48
c477d0fcc6 refactor: XWindowsKeyState::init remove unused display var 2025-09-05 11:52:17 +01:00
sithlord48
bc63961e7e refactor: EIEventQueueBuffer remove unused screen from constructor 2025-09-05 11:52:17 +01:00
sithlord48
138ede0536 refactor: use If in place of switch that looks for single case 2025-09-01 16:57:39 +01:00
sithlord48
507c98adff refactor: EIKeyState::fakeKey use if in place of a switch that cares only about a single case 2025-09-01 16:57:39 +01:00
Nick Bolton
07edccb469 fix: Add 'Hyper' key handling
In the X11 code, we mapped hyper to super, so perhaps it makes sense to do that here too:

`src/lib/platform/XWindowsUtil.cpp`
```
  case XK_Super_L:
  case XK_Super_R:
  case XK_Hyper_L:
  case XK_Hyper_R:
    return kKeyModifierBitSuper;
```
2025-08-26 09:52:43 -04:00
Zhuofeng Wang
927075688c fix: Pass ClientScrollDirection to EiScreen 2025-08-26 09:08:45 -04:00
sithlord48
b18c3b588f refactor: EIKeyState, compare to the current state when seeing if modifiers are inactive, suggested by wismill 2025-08-26 11:23:29 +01:00
Nick Bolton
34c439b3de refactor: Use single case to ignore mods in EI mod mask 2025-08-22 17:04:16 +01:00
Nick Bolton
934ddf1499 fix: Disable meta mod (fixes alt key bug) 2025-08-22 17:04:16 +01:00
Nick Bolton
4302d50a42 feat: Use xkb_keymap_mod_get_mask in EiKeyState if available
Introduced in xkbcommon v1.10.0
2025-08-22 16:06:03 +01:00
sithlord48
299ebea0e2 refactor: replace QString::toStdString().c_str with qPrintable(...) 2025-08-22 09:54:20 +01:00
sithlord48
d3c0ce8895 refactor: move all exit codes to new ExitCodes
add new exitcode s_exitDuplicate for when exiting because of already running instance
2025-08-21 12:34:50 +01:00
sithlord48
b2aa638b1f feat: Support Remote Desktop token persistance 2025-08-19 15:46:14 +01:00
sithlord48
bcb6c368b1 refactor: remove unneeded common/Common includes 2025-08-18 11:45:21 +01:00
sithlord48
4eec183598 refactor: remove IInterface class, that only adds a virtual construcor 2025-08-18 11:45:21 +01:00
sithlord48
d2d28f5ad6 refactor: XWinowsUtil make s_keymap a std::array 2025-08-15 12:15:40 +01:00
sithlord48
2e193c6a78 chore: PortalInputCapture, conform to naming conventions 2025-08-11 12:58:52 -04:00
sithlord48
f95230549a chore: EiScreen: conform to nameing conventions 2025-08-11 12:58:52 -04:00
sithlord48
a13803df94 chore: EiKeyState, conform to naming conventions 2025-08-11 12:58:52 -04:00
sithlord48
2ba7fb2f05 chore: EiEventQueueBuffer, conform to naming conventions 2025-08-11 12:58:52 -04:00
sithlord48
9442295227 chore: remove unused HYPER key 2025-08-11 12:32:50 -04:00
sithlord48
a21d48defb refactor: reorder initilization order in XWindowEventQueueBuffer constructor 2025-08-11 12:32:50 -04:00
sithlord48
3770e2c39e chore: XWindowsScreen::handleSystemEvent, remove unused Window variables 2025-08-11 12:32:50 -04:00
sithlord48
8d90515446 chore: define var on seperate line from type 2025-08-11 12:32:50 -04:00
sithlord48
6153f64fb7 chore: remove uneeded casts 2025-08-11 12:32:50 -04:00
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