Don't try to send grants for not realized windows#236
Don't try to send grants for not realized windows#236marmarek merged 11 commits intoQubesOS:mainfrom
Conversation
gui-agent/vmside.c
Outdated
| struct window_data *wd; | ||
| SKIP_NONMANAGED_WINDOW; | ||
|
|
||
| wd = list_lookup(windows_list, window)->data; |
There was a problem hiding this comment.
Since you do list_lookup here anyway, you can open-code (modified) SKIP_NONMANAGED_WINDOW here to avoid traversing the list twice.
There was a problem hiding this comment.
Yeah, saw that. But after having started refactoring this (there are multiple, slightly different variants in that code), I postponed it to first get this out. Will fix it.
There was a problem hiding this comment.
Moved into the "vmside: cleanup window lookup" commit in #239
|
Interesting, so it seems we found this issue before already, just hasn't realized its full scope: 8b53d36 |
Oh, yeah, interesting. This reminded me to have another look at the event ordering/generation. I'm not sure if the details of my description is accurate. |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025071903-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025061004-4.3&flavor=update
Failed tests10 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/142375#dependencies 10 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:9 performance degradations
Remaining performance tests:63 tests
|
|
(none of the openQA failures is related to this PR) |
gcc complains about our usage of strncpy. Under Linux zero padding without termination is actually ok. The path comes from trusted input. Silent trunctaion is still not nice. So clean this up.
We rely on composite redirect mode of the X server to get per window pixmaps. Those are setup/teared-down in compRealizeWindow/ compUnrealizeWindow (via compCheckRedirect). So not realized windows don't have a per window pixmap. Sending grant refs for them was always broken since we didn't send the offset into the screen pixmap in those cases. But with the recent change to not allocate grant refs for the screen pixmap this leads to a noticable error message. So don't try to send grant refs for not realized windows. See also added inline comment and QubesOS#236
6a6d733 to
0fc7bb1
Compare
|
Sending custom events from the video driver to the agent is actually easier than I remembered (probably confused it with what we are doing between agent and input driver). So ended up implementing the nicer fix. Only downside is that the extension handling needs quite a bit of boilerplate code, particularly on the Xlib side. This PR now depends on #239 (changed on top of the cleanup branch) |
We rely on composite redirect mode of the X server to get per window pixmaps. Those are setup/teared-down in compRealizeWindow/ compUnrealizeWindow (via compCheckRedirect).
So not realized windows don't have a per window pixmap. Sending grant refs for them was always broken since we didn't send the offset into the screen pixmap in those cases. But with the recent change to not allocate grant refs for the screen pixmap this leads to a noticable error message.
So don't try to send grant refs for not realized windows. This means that the configure before mapping will not contiain grant refs. But when we map the window we will get a damage event because of the new pixmap compRealizeWindow has allocated and send them then. So this should be fine.