Skip to content

fix: Pass ClientScrollDirection to EiScreen - #8896

Merged
sithlord48 merged 1 commit into
deskflow:masterfrom
coekfung:master
Aug 26, 2025
Merged

fix: Pass ClientScrollDirection to EiScreen#8896
sithlord48 merged 1 commit into
deskflow:masterfrom
coekfung:master

Conversation

@coekfung

Copy link
Copy Markdown
Contributor

The ClientScrollDirection argument, which controls inverted scrolling, was not being passed to EiScreen. This PR passes args().m_clientScrollDirection to EiScreen, fixing a bug where the "invert scroll direction" option had no effect for Wayland clients.

@nbolton

nbolton commented Aug 26, 2025

Copy link
Copy Markdown
Member

Nice, I will test. Are there any issues we can mark fixed with this?

Repro steps for the bug would make testing a bit easier for us poor maintainers :D

Edit: Would you mind fixing the lint issue? Let me know if you want me to do this.

@github-actions

Copy link
Copy Markdown

CI Summary

Lint result

clang-format v20.1.0: It looks like your changes don't match our code style.

🛠️ Please either run clang-format -i on the file or apply this patch with git apply:

clang-format.diff

diff --git a/src/lib/deskflow/ClientApp.cpp b/src/lib/deskflow/ClientApp.cpp
index 0cfb83c..e0a2199 100644
--- a/src/lib/deskflow/ClientApp.cpp
+++ b/src/lib/deskflow/ClientApp.cpp
@@ -170,7 +170,9 @@ deskflow::Screen *ClientApp::createScreen()
   if (deskflow::platform::isWayland()) {
 #if WINAPI_LIBEI
     LOG_INFO("using ei screen for wayland");
-    return new deskflow::Screen(new deskflow::EiScreen(false, getEvents(), true, args().m_clientScrollDirection), getEvents());
+    return new deskflow::Screen(
+        new deskflow::EiScreen(false, getEvents(), true, args().m_clientScrollDirection), getEvents()
+    );
 #else
     throw XNoEiSupport();
 #endif

Hint: Install the right version of clang-format, e.g.: pipx install --global clang-format==20.1.0

Full summary (scroll down)

@coekfung

Copy link
Copy Markdown
Contributor Author

Nice, I will test. Are there any issues we can mark fixed with this?

Repro steps for the bug would make testing a bit easier for us poor maintainers :D

Edit: Would you mind fixing the lint issue? Let me know if you want me to do this.

Thanks for the feedback! I've fixed the linting issues.

The reproduction steps are straightforward:

  • Connect from a Wayland-based client (e.g., GNOME on Wayland).
  • Toggle the "Invert scroll direction on this computer" option in the preferences.

Before this fix: The scroll direction remained unchanged regardless of the setting.
After this fix: The option now works as expected.

I've searched the existing open issues, but I couldn't find anyone else who has reported this.

@sithlord48 sithlord48 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your second commit should not be in this pr correct the lint by commit --append the fix.

@coekfung

Copy link
Copy Markdown
Contributor Author

Ohh no, I mistakenly closed this pr, let me check how to reopen.

@coekfung coekfung reopened this Aug 26, 2025
@coekfung

Copy link
Copy Markdown
Contributor Author

Your second commit should not be in this pr correct the lint by commit --append the fix.

Thanks for your help!

@sithlord48
sithlord48 enabled auto-merge (rebase) August 26, 2025 12:51
@sithlord48
sithlord48 merged commit 9270756 into deskflow:master Aug 26, 2025
28 of 29 checks passed
@nbolton

nbolton commented Aug 27, 2025

Copy link
Copy Markdown
Member

Your second commit should not be in this pr correct the lint by commit --append the fix.

Damn, I knew I'd miss something. I'm pretty bad at checking individual commits (I usually use the 'Files changed' tab).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants