forked from flacjacket/pywlroots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd53b23
commit 0b54ba7
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2024 Jeroen Wijenbergh | ||
|
||
from pywayland.server import Display | ||
|
||
from wlroots import PtrHasData, lib | ||
|
||
from .compositor import Surface | ||
|
||
|
||
class FractionalScaleManagerV1(PtrHasData): | ||
def __init__(self, display: Display, version: int = 1) -> None: | ||
"""Create a wlr_fractional_scale_manager_v1""" | ||
self._ptr = lib.wlr_fractional_scale_manager_v1_create(display._ptr, version) | ||
|
||
def notify_scale(self, surface: Surface, scale: float): | ||
lib.wlr_fractional_scale_v1_notify_scale(surface._ptr, scale) |
0b54ba7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to bother you again, but notify_scale shouldn't be a method of FractionalScaleManagerV1. See also the "missing" wlr_fractional_scale_manager_v1-prefix of https://wayland.emersion.fr/wlroots/wlr/types/wlr_fractional_scale_v1.h.html#func-wlr_fractional_scale_v1_notify_scale
It should be a function in the scope of the module.
The CDEF needs to be expanded by
0b54ba7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sorry makes sense, I did this quickly to test fractional scaling with qtile. Done