-
-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yuxuan Shui <[email protected]>
- Loading branch information
Showing
4 changed files
with
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
unredir-if-possible = true; |
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,42 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import xcffib.xproto as xproto | ||
import xcffib | ||
from common import * | ||
|
||
conn = xcffib.connect() | ||
setup = conn.get_setup() | ||
root = setup.roots[0].root | ||
visual = setup.roots[0].root_visual | ||
depth = setup.roots[0].root_depth | ||
|
||
selection_name = "_NET_WM_CM_S0" | ||
selection = conn.core.InternAtom(0, len(selection_name), selection_name).reply().atom | ||
|
||
# assertion failure mentioned in 1091 happens when a root change happens right after we | ||
# redirected the screen, before we have even rendered a single frame | ||
wid = conn.generate_id() | ||
print("Window id is ", hex(wid)) | ||
|
||
# Create a window | ||
conn.core.CreateWindowChecked(depth, wid, root, 0, 0, 100, 100, 0, xproto.WindowClass.InputOutput, visual, 0, []).check() | ||
|
||
# Map the window | ||
print("mapping") | ||
conn.core.MapWindowChecked(wid).check() | ||
|
||
time.sleep(0.5) | ||
|
||
for i in range(0, 100): | ||
set_window_bypass_compositor(conn, wid) | ||
|
||
time.sleep(0.5) | ||
|
||
set_window_bypass_compositor(conn, wid, 0) | ||
reply, mode, output = prepare_root_configure(conn) | ||
|
||
time.sleep(0.2) | ||
r = conn.core.GetSelectionOwner(selection).reply() | ||
if r.owner == 0: | ||
# picom died | ||
break |