Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def set_active(self):
prop_set(self.client_window.get_screen().get_root_window(), "_NET_ACTIVE_WINDOW", "u32", self.client_window.xid)
def _write_initial_properties_and_setup(self):
# Things that don't change:
prop_set(self.client_window, "_NET_WM_ALLOWED_ACTIONS",
["atom"], self._NET_WM_ALLOWED_ACTIONS)
prop_set(self.client_window, "_NET_FRAME_EXTENTS",
["u32"], [0, 0, 0, 0])
self.connect("notify::state", self._handle_state_changed)
# Flush things:
self._handle_state_changed()
def root_set(*args):
prop_set(gtk.gdk.get_default_root_window(), *args)
def set_tray_visual(tray_window, gdk_visual):
prop_set(tray_window, TRAY_VISUAL, "visual", gdk_visual)
def save_xvfb_pid(pid):
import gtk
from xpra.x11.gtk_x11.prop import prop_set
prop_set(gtk.gdk.get_default_root_window(),
"_XPRA_SERVER_PID", "u32", pid)
def xset_u32_property(self, target, name, value):
prop_set(target, name, "u32", value)
def _write_initial_properties_and_setup(self):
# Things that don't change:
prop_set(self.client_window, "_NET_WM_ALLOWED_ACTIONS",
["atom"], self._NET_WM_ALLOWED_ACTIONS)
prop_set(self.client_window, "_NET_FRAME_EXTENTS",
["u32"], [0, 0, 0, 0])
self.connect("notify::state", self._handle_state_changed)
# Flush things:
self._handle_state_changed()