Skip to content

Provides support for version 1.5 of RANDR protocol#224

Closed
allfro wants to merge 3 commits intopython-xlib:masterfrom
allfro:master
Closed

Provides support for version 1.5 of RANDR protocol#224
allfro wants to merge 3 commits intopython-xlib:masterfrom
allfro:master

Conversation

@allfro
Copy link
Copy Markdown
Contributor

@allfro allfro commented May 9, 2022

The following pull request provides the following updates:

  • Support for RANDR v1.5 monitor methods (RRSetMonitor, XRRDeleteMonitor, XRRGetMonitors)
  • A bug fix to rq.py that allows for proper packing of embedded Object fields in the request structs

allfro added 3 commits May 9, 2022 17:03
Fixes return type inconsistency with the `pack_value` for class `Object`.
When using an `Object` field embedded in a request `pack_value` croaks because it calls to_binary which returns a byte buffer instead of a
3-value tuple. This fix addresses the issue.
Add version 1.5 support for RRSetMonitor RRGetMonitors and RRDeleteMonitors
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #224 (1b123ca) into master (bb8685a) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
- Coverage   78.12%   78.11%   -0.02%     
==========================================
  Files          41       41              
  Lines        4645     4646       +1     
==========================================
  Hits         3629     3629              
- Misses       1016     1017       +1     


def pack_value(self, val):
return self.type.pack_value(val)
val = self.type.pack_value(val)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The suggestion to fix underlying functions is also applicable here.

@@ -25,7 +25,7 @@
This implementation is based off version 1.3 of the XRandR protocol, and may
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

1.3 -> 1.5



Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks like unnecessary extra spaces were added here.

disp.extension_add_method('display', 'xrandr_set_panning', set_panning)

# version 1.5 compatible
disp.extension_add_method('window', 'xrandr_get_monitors', get_monitors)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if version 1.5 is present almost everywhere for now. Does it make sense to check version of the extension? So that we can support both 1.3 and 1.5+.

jklong pushed a commit to jklong/python-xlib that referenced this pull request Sep 11, 2022
@jklong jklong mentioned this pull request Sep 11, 2022
vasily-v-ryabov pushed a commit that referenced this pull request Sep 17, 2022
@vasily-v-ryabov
Copy link
Copy Markdown
Collaborator

Fixed in another PR. Closing.

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