Clean up stderr
Don't show messages about wl_outputs that pywayland doesn't recognize.
By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.
Don't show messages about wl_outputs that pywayland doesn't recognize.
soreau,
created on Wednesday, 3 September 2025, 02:01:51 (1756864911),
received on Saturday, 6 September 2025, 21:54:28 (1757195668)
Author identity: Scott Moreau <oreaus@gmail.com>
788f7e160c7920c7a63b474d00786140ef1f57da
def foreign_toplevel_output_enter(self, handle, output):
print("foreign_toplevel_output_enter")
if self.show_only_this_output and output.name != self.get_root().monitor_name:
if self.show_only_this_output and (not hasattr(output, "name") or output.name != self.get_root().monitor_name):
return
button = WindowButton(handle, handle.title, self)
self.screencopy_manager = None
self.manager_window = None
self.edit_mode = False
self.output_proxies = []
self.drags = {}
self.wl_output_ids = set()
self.started = False
def receive_output_name(self, output: WlOutput, name: str):
output.name = name
def idle_proxy_cover(self, output_name):
for monitor in self.display.get_monitors():
wl_output = gtk.gdk_wayland_monitor_get_wl_output(ffi.cast("void *", ctypes.pythonapi.PyCapsule_GetPointer(monitor.__gpointer__, None)))
if wl_output:
print("Create proxy")
output_proxy = WlOutputProxy(wl_output, self.wl_display)
output_proxy.interface.registry[output_proxy._ptr] = output_proxy
self.output_proxies.append(output_proxy)
def on_global(self, registry, name, interface, version):
if interface == "zwlr_foreign_toplevel_manager_v1":
print("Interface registered")
break
if not my_monitor:
continue
self.idle_proxy_cover(my_monitor.get_connector())
size = panel_data["size"]
autohide = panel_data["autohide"]
hide_time = panel_data["hide_time"]
self.foreign_toplevel_manager_id = None
self.foreign_toplevel_version = None
self.idle_proxy_cover(None)
self.registry = self.wl_display.get_registry()
self.registry.dispatcher["global"] = self.on_global
self.registry.dispatcher["global_remove"] = self.on_global_remove