Title: shape_combine definition is invalid - TypeError: Missing required argument destination_window · Issue #262 · python-xlib/python-xlib · GitHub
Open Graph Title: shape_combine definition is invalid - TypeError: Missing required argument destination_window · Issue #262 · python-xlib/python-xlib
X Title: shape_combine definition is invalid - TypeError: Missing required argument destination_window · Issue #262 · python-xlib/python-xlib
Description: I thought I was missing something, but it's looking like no one has EVER used shape_combine, but the definition of the function does not attempt to create the object with the required destination_window parameter: class Combine(rq.Reques...
Open Graph Description: I thought I was missing something, but it's looking like no one has EVER used shape_combine, but the definition of the function does not attempt to create the object with the required destination_w...
X Description: I thought I was missing something, but it's looking like no one has EVER used shape_combine, but the definition of the function does not attempt to create the object with the required destinati...
Opengraph URL: https://github.com/python-xlib/python-xlib/issues/262
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"shape_combine definition is invalid - TypeError: Missing required argument destination_window","articleBody":"I thought I was missing something, but it's looking like no one has EVER used shape_combine, but the definition of the function does not attempt to create the object with the required destination_window parameter:\r\n\r\n```\r\nclass Combine(rq.Request):\r\n\r\n _request = rq.Struct(\r\n rq.Card8('opcode'),\r\n rq.Opcode(3),\r\n rq.RequestLength(),\r\n OP('operation'),\r\n KIND('destination_kind'),\r\n KIND('source_kind'),\r\n rq.Pad(1),\r\n rq.Window('destination_window'),\r\n rq.Int16('x_offset'),\r\n rq.Int16('y_offset'),\r\n rq.Window('source_window'),\r\n )\r\n[...]\r\ndef combine(self, operation, destination_kind, source_kind, x_offset, y_offset):\r\n Combine(\r\n display=self.display,\r\n opcode=self.display.get_extension_major(extname),\r\n source_window=self,\r\n operation=operation,\r\n destination_kind=destination_kind,\r\n source_kind=source_kind,\r\n x_offset=x_offset,\r\n y_offset=y_offset,\r\n )\r\n\r\n```\r\nshape_mask is, in believe, only different from shape_combine in that it takes in a window of varying colour depth, instead of a binary bitmap. As such the parameters should be identical except the source_bitmap parameter in shape_mask should instead be the source_kind option (present) and source_window (missing!) in shape_combine. mask is defined as:\r\n\r\n```\r\ndef mask(self, operation, destination_kind, x_offset, y_offset, source_bitmap):\r\n Mask(\r\n display=self.display,\r\n opcode=self.display.get_extension_major(extname),\r\n destination_window=self,\r\n operation=operation,\r\n destination_kind=destination_kind,\r\n x_offset=x_offset,\r\n y_offset=y_offset,\r\n source_bitmap=source_bitmap,\r\n )\r\n```\r\nso combine should actually be defined as:\r\n```\r\ndef combine(self, operation, destination_kind, source_kind, x_offset, y_offset):\r\n Combine(\r\n display=self.display,\r\n opcode=self.display.get_extension_major(extname),\r\n source_window=source_window\r\n destination_window=self,\r\n operation=operation,\r\n destination_kind=destination_kind,\r\n source_kind=source_kind,\r\n x_offset=x_offset,\r\n y_offset=y_offset,\r\n source_window=source_window\r\n )\r\n```\r\nIndeed it seems that parameters for source and destination windows have in fact been... wait for it... combined! \r\n\r\n #263 ","author":{"url":"https://github.com/acidkewpie","@type":"Person","name":"acidkewpie"},"datePublished":"2023-03-15T22:55:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/262/python-xlib/issues/262"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7c2ca22d-930a-d3e4-2c83-c10bd8a40483 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA5C:3C7D7F:291D415:377CF58:696AEB1F |
| html-safe-nonce | 18baacf3358c9927102c7119d19b301a86743886c28eaa49c8cff779e6e6c292 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTVDOjNDN0Q3RjoyOTFENDE1OjM3N0NGNTg6Njk2QUVCMUYiLCJ2aXNpdG9yX2lkIjoiNzAzOTgwNzYwNzMyMDI3NTc0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dc7809ab3f03884d4f0686e6e3f1329b8bc0ac610c5ab2e391af0fc9a10abbd9 |
| hovercard-subject-tag | issue:1626393737 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-xlib/python-xlib/262/issue_layout |
| twitter:image | https://opengraph.githubassets.com/750a56fbf4b884eadf0de27ba38d1b25ebc3787d25d14c8bf5cdef3e034e2cf5/python-xlib/python-xlib/issues/262 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/750a56fbf4b884eadf0de27ba38d1b25ebc3787d25d14c8bf5cdef3e034e2cf5/python-xlib/python-xlib/issues/262 |
| og:image:alt | I thought I was missing something, but it's looking like no one has EVER used shape_combine, but the definition of the function does not attempt to create the object with the required destination_w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | acidkewpie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python-xlib/python-xlib git https://github.com/python-xlib/python-xlib.git |
| octolytics-dimension-user_id | 16151530 |
| octolytics-dimension-user_login | python-xlib |
| octolytics-dimension-repository_id | 47391866 |
| octolytics-dimension-repository_nwo | python-xlib/python-xlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 47391866 |
| octolytics-dimension-repository_network_root_nwo | python-xlib/python-xlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width