mirror of
				https://github.com/yshui/picom.git
				synced 2025-10-30 23:46:46 -04:00 
			
		
		
		
	tests: common: add set_window_state
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
		
							parent
							
								
									f504b1d37e
								
							
						
					
					
						commit
						3b38b56d89
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -16,6 +16,10 @@ def set_window_name(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_state(conn, wid, state):
 | 
			
		||||
    prop_name = to_atom(conn, "WM_STATE")
 | 
			
		||||
    conn.core.ChangePropertyChecked(xproto.PropMode.Replace, wid, prop_name, prop_name, 32, 2, [state, 0]).check()
 | 
			
		||||
 | 
			
		||||
def set_window_class(conn, wid, name):
 | 
			
		||||
    if not isinstance(name, bytearray):
 | 
			
		||||
        name = name.encode()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue