Title: Cannot raise window on top using configure() or raise_window() · Issue #280 · python-xlib/python-xlib · GitHub
Open Graph Title: Cannot raise window on top using configure() or raise_window() · Issue #280 · python-xlib/python-xlib
X Title: Cannot raise window on top using configure() or raise_window() · Issue #280 · python-xlib/python-xlib
Description: I'm trying to bring a specific window on top of all else and set focus to it. This is what I have so far: def focus_window(window_id): d = display.Display() window = d.create_resource_object('window', window_id) window.map() window.confi...
Open Graph Description: I'm trying to bring a specific window on top of all else and set focus to it. This is what I have so far: def focus_window(window_id): d = display.Display() window = d.create_resource_object('windo...
X Description: I'm trying to bring a specific window on top of all else and set focus to it. This is what I have so far: def focus_window(window_id): d = display.Display() window = d.create_resource_object(...
Opengraph URL: https://github.com/python-xlib/python-xlib/issues/280
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot raise window on top using configure() or raise_window()","articleBody":"I'm trying to bring a specific window on top of all else and set focus to it. This is what I have so far:\r\n```\r\ndef focus_window(window_id):\r\n d = display.Display()\r\n window = d.create_resource_object('window', window_id)\r\n window.map()\r\n window.configure(x=10, y=30, width=800, height=600, stack_mode=X.Above)\r\n window.set_input_focus(X.RevertToParent, X.CurrentTime)\r\n d.sync()\r\n\r\nif __name__ == \"__main__\":\r\n focus_window(0x034000fc)\r\n```\r\nWith the code above, everything works except the window being drawn on top. The focus is put into the window of interest, said window is moved and resized as expected but it doesn't raise on top. If I use `window.raise_window()` nothing happens. Using either methods, I don't get any error messages, it just doesn't work.\r\n\r\nAm I missing something, or doing something wrong? I'm using MATE Desktop (on X, of course), Python 3.12.7 on Fedora.\r\n\r\nAlso, is there a way to get the window ID from the process PID using python-xlib? At the moment I'm using wmctrl but I'm wondering if there's a better way.\r\nThanks.","author":{"url":"https://github.com/invader-zimm","@type":"Person","name":"invader-zimm"},"datePublished":"2024-12-21T20:38:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/280/python-xlib/issues/280"}
| 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:547acf6e-4d1d-fb34-b09d-dd0adae4fdb2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D864:2DC926:126B5DD:19D694D:696FC9B0 |
| html-safe-nonce | 6f2dd79da4305db744e31f4005a90aed9f02916f1de3fe0b7df7c0a350ebfb28 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODY0OjJEQzkyNjoxMjZCNUREOjE5RDY5NEQ6Njk2RkM5QjAiLCJ2aXNpdG9yX2lkIjoiNzM5MjE0MTgyNjM1OTAxOTk1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6c46a9d68e6e05878abf7c0f34222fc1dd07961ca5d10e4616e88e83a661c528 |
| hovercard-subject-tag | issue:2754354227 |
| 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/280/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3a8af1af2ed94b59bca21749db08b55ac8444fbd3c25a9303706791e160b1e45/python-xlib/python-xlib/issues/280 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3a8af1af2ed94b59bca21749db08b55ac8444fbd3c25a9303706791e160b1e45/python-xlib/python-xlib/issues/280 |
| og:image:alt | I'm trying to bring a specific window on top of all else and set focus to it. This is what I have so far: def focus_window(window_id): d = display.Display() window = d.create_resource_object('windo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | invader-zimm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 330ca0f04ee8ecef1da04306a0dd49293f64679ee9a4bd5eaf2e1272bfdcf145 |
| 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 | 816ad575e27a390de2e2089ebe75261d12de9b37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width