1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-04-14 17:53:25 -04:00

tests: don't call .check() in set_window_size

So we can bundle this request together with other requests, making
reproducing time critical bugs easier.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2020-11-28 19:49:15 +00:00
parent fb35feb54e
commit bf5a9ca154
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4
2 changed files with 4 additions and 4 deletions

View file

@ -28,10 +28,10 @@ def set_window_class(conn, wid, name):
str_type = to_atom(conn, "STRING")
conn.core.ChangePropertyChecked(xproto.PropMode.Replace, wid, prop_name, str_type, 8, len(name), name).check()
def set_window_size(conn, wid, width, height):
def set_window_size_async(conn, wid, width, height):
value_mask = xproto.ConfigWindow.Width | xproto.ConfigWindow.Height
value_list = [width, height]
conn.core.ConfigureWindowChecked(wid, value_mask, value_list).check()
return conn.core.ConfigureWindowChecked(wid, value_mask, value_list)
def find_picom_window(conn):
prop_name = to_atom(conn, "WM_NAME")

View file

@ -3,7 +3,7 @@
import xcffib.xproto as xproto
import xcffib
import time
from common import set_window_name, set_window_size
from common import set_window_name, set_window_size_async
conn = xcffib.connect()
setup = conn.get_setup()
@ -29,7 +29,7 @@ time.sleep(0.5)
# Resize the window and destroy
print("resize and destroy")
set_window_size(conn, wid, 150, 150)
set_window_size_async(conn, wid, 150, 150)
conn.core.DestroyWindowChecked(wid).check()
time.sleep(0.5)