| 1 |
|
| 2 |
|
| 3 |
import xcffib.xproto as xproto |
| 4 |
import xcffib |
| 5 |
from common import * |
| 6 |
|
| 7 |
conn = xcffib.connect() |
| 8 |
setup = conn.get_setup() |
| 9 |
root = setup.roots[0].root |
| 10 |
visual = setup.roots[0].root_visual |
| 11 |
depth = setup.roots[0].root_depth |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
wid = conn.generate_id() |
| 16 |
print("Window id is ", hex(wid)) |
| 17 |
|
| 18 |
|
| 19 |
conn.core.CreateWindowChecked(depth, wid, root, 0, 0, 100, 100, 0, xproto.WindowClass.InputOutput, visual, 0, []).check() |
| 20 |
|
| 21 |
|
| 22 |
print("mapping") |
| 23 |
conn.core.MapWindowChecked(wid).check() |
| 24 |
|
| 25 |
time.sleep(0.5) |
| 26 |
|
| 27 |
for i in range(0, 8): |
| 28 |
modes = [] |
| 29 |
for s in range(0, 10): |
| 30 |
reply, mode, output = prepare_root_configure(conn, i * 100 + 100 + s) |
| 31 |
modes.append((reply, mode, output)) |
| 32 |
|
| 33 |
set_window_bypass_compositor(conn, wid).check() |
| 34 |
time.sleep(0.1) |
| 35 |
|
| 36 |
set_window_bypass_compositor(conn, wid, 0) |
| 37 |
conn.flush() |
| 38 |
for reply, mode, output in modes: |
| 39 |
trigger_root_configure(conn, reply, mode, output).reply() |
| 40 |
|
| 41 |
time.sleep(0.1) |