Skip to content

Commit

Permalink
main.gudl: Work around Skyrim Launcher bug on Wine.
Browse files Browse the repository at this point in the history
Simulating a click causes an SC_MOVE command. On Windows,
releasing the mouse button immediately ends the move, and then
the button is activated so it's not noticeable. On Wine, the
command gets forwarded to the Linux WM, which can't see our
simulated button release event, so it gets "stuck" in pointer
move mode.

Unfortunately, WM_LBUTTONDOWN causes both of those things, so we
can't just send a message to make the button activate. But, if we
disable the window then SC_MOVE has no effect, while we can still
send a WM_LBUTTONDOWN message to the disabled window.
  • Loading branch information
madewokherd committed Mar 15, 2024
1 parent e321227 commit d2ccfc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xalia/main.gudl
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ application (name == "plasmashell") {
image (interactable and parent.(dialog and win32_process_name == "SkyrimLauncher") and
control_id != 103) {
targetable: true;
primary_action: send_click;
primary_action:
parent.disable_window + // Disable the window so it can't do SC_MOVE which causes problems on Wine
parent.send_message(0x201, 0, (y - parent.client_y) * 0x10000 + (x - parent.client_x)) + // WM_LBUTTONDOWN
parent.enable_window;
if (control_id == 1004) { // Play button
confirm_action: primary_action;
target_priority: 1;
Expand Down

0 comments on commit d2ccfc4

Please sign in to comment.