Exemplo n.º 1
0
def find_picom_window(conn):
    prop_name = to_atom(conn, "WM_NAME")
    setup = conn.get_setup()
    root = setup.roots[0].root
    windows = conn.core.QueryTree(root).reply()

    ext = xproto.xprotoExtension(conn)
    for w in windows.children:
        name = ext.GetProperty(False, w, prop_name, xproto.GetPropertyType.Any,
                               0, (2**32) - 1).reply()
        if name.value.buf() == b"picom":
            return w
Exemplo n.º 2
0
	def grabKey( self, winId, key ):
		# Then, we can actually grab the key.
		xprotoExtension = xproto.xprotoExtension( self.connection )

		xprotoExtension.GrabKey(
			key = 133,
			modifiers = xproto.ModMask.Any,
			grab_window = QX11Info.appRootWindow(),
			# This is False because we want to steal the keyboard events from the root window.
			owner_events = False,
			# The name `Async` is misleading here; all it means is that we don't freeze the entire
			# server with our grab.
			pointer_mode = xproto.GrabMode.Async,
			keyboard_mode = xproto.GrabMode.Async
		)
Exemplo n.º 3
0
#!/usr/bin/env python

import xcffib.xproto as xproto
import xcffib
import time
from common import set_window_name

conn = xcffib.connect()
setup = conn.get_setup()
root = setup.roots[0].root
visual = setup.roots[0].root_visual
depth = setup.roots[0].root_depth
x = xproto.xprotoExtension(conn)

opacity_100 = [
    0xffffffff,
]
opacity_80 = [
    int(0xffffffff * 0.8),
]
opacity_single = [
    int(0xffffffff * 0.002),
]
opacity_0 = [
    0,
]

# issue 314 is caused by changing a windows target opacity during its fade-in/-out transition
wid1 = conn.generate_id()
print("Window 1: ", hex(wid1))