Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support content-type-v1 proto #9226

Merged
merged 12 commits into from
Feb 2, 2025
Merged

Support content-type-v1 proto #9226

merged 12 commits into from
Feb 2, 2025

Conversation

UjinT34
Copy link
Contributor

@UjinT34 UjinT34 commented Jan 29, 2025

Describe your PR, what does it fix/add?

  • add content-type-v1 proto support
  • cursor:no_break_fs_vrr now defaults to 2 - auto: enabled for content type "game" Window Rule for VRR #7621
  • render:direct_scanout can be set to 2 - auto: enabled for content type "game"
  • window field matching content type content:TYPE
  • window rule to set content type content TYPE
  • set drm property
  • check AQ version in preprocessor

TYPE is none, photo, video or game

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

If there are any clients which support this proto and set the type to "game" than new defaults might be unexpected.
Window rule is static. Any reason to make it dynamic?
Needs some testing with different AQ versions. Should be able to build with and without output->state->setContentType support.
Meson build is untested.

Is it ready for merging, or does it need work?

Ready. drm part is not important, requires hyprwm/aquamarine#140 with a version bump. Assumes that 0.7.3 will have it merged.

@vaxerski
Copy link
Member

DS is not ready for auto enabling. It has buffer release / timing issues (esp on amd)

@Kommynct
Copy link

what about enabling tearing for games?

@UjinT34 UjinT34 mentioned this pull request Jan 30, 2025
6 tasks
@vaxerski
Copy link
Member

we already have the tearing hint protocol for that

@UjinT34 UjinT34 marked this pull request as ready for review February 1, 2025 11:24
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

rest lgtm

@vaxerski vaxerski merged commit 31431a9 into hyprwm:main Feb 2, 2025
12 checks passed
@@ -19,6 +19,7 @@
#include "WLSurface.hpp"
#include "Workspace.hpp"
#include "WindowRule.hpp"
#include "protocols/types/ContentType.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

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

My plugin doesn't build because of this line, with the following error:

╰─❯ make all
Hyprland headers found.
Building with XWayland support.
g++ -shared -g -fPIC --no-gnu-unique -std=c++23 `pkg-config --cflags pixman-1 libdrm hyprland` -Iinclude -DWLR_USE_UNSTABLE src/main.cpp -o split-monitor-workspaces.so
In file included from /usr/include/hyprland/src/Compositor.hpp:8,
                 from src/main.cpp:3:
/usr/include/hyprland/src/desktop/Window.hpp:22:10: fatal error: protocols/types/ContentType.hpp: No such file or directory
   22 | #include "protocols/types/ContentType.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:38: split-monitor-workspaces.so] Error 1

It does build if I change the line to #include "../protocols/types/ContentType.hpp" (which is also where the actual file is). Any ideas why this happens?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be a correct path when building from the source directory. Otherwise it's strange that CI didn't catch it. Most of the imports in this PR are generated by IDE.

Copy link
Contributor

@zjeffer zjeffer Feb 2, 2025

Choose a reason for hiding this comment

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

Most of the imports in this PR are generated by IDE.

Did you work in the src/ folder in your IDE while developing this, instead of the root folder?

Copy link
Member

Choose a reason for hiding this comment

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

oh yeah I missed this... we can't have imports using src paths
always relative

Copy link
Member

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

thx

Copy link
Contributor

Choose a reason for hiding this comment

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

You missed one in src/desktop/Window.hpp

Copy link
Contributor

Choose a reason for hiding this comment

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

and in src/events/Windows.cpp
and likely some other places ;)

Copy link
Member

Choose a reason for hiding this comment

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

better?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, ty

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

Successfully merging this pull request may close these issues.

4 participants