本文整理汇总了Python中xpra.x11.x11_server_base.X11ServerBase._add_new_window_common方法的典型用法代码示例。如果您正苦于以下问题:Python X11ServerBase._add_new_window_common方法的具体用法?Python X11ServerBase._add_new_window_common怎么用?Python X11ServerBase._add_new_window_common使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xpra.x11.x11_server_base.X11ServerBase
的用法示例。
在下文中一共展示了X11ServerBase._add_new_window_common方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_existing_windows
# 需要导入模块: from xpra.x11.x11_server_base import X11ServerBase [as 别名]
# 或者: from xpra.x11.x11_server_base.X11ServerBase import _add_new_window_common [as 别名]
def load_existing_windows(self):
#at present, just one window is forwarded:
#the root window covering the whole display
display = gtk.gdk.display_get_default()
screens = display.get_n_screens()
for n in range(screens):
screen = display.get_screen(n)
root = screen.get_root_window()
model = DesktopModel(root)
model.setup()
windowlog("adding root window model %s", model)
X11ServerBase._add_new_window_common(self, model)
model.managed_connect("client-contents-changed", self._contents_changed)
model.managed_connect("resized", self._window_resized_signaled)
示例2: _add_new_window_common
# 需要导入模块: from xpra.x11.x11_server_base import X11ServerBase [as 别名]
# 或者: from xpra.x11.x11_server_base.X11ServerBase import _add_new_window_common [as 别名]
def _add_new_window_common(self, window):
wid = X11ServerBase._add_new_window_common(self, window)
window.managed_connect("client-contents-changed", self._contents_changed)
window.managed_connect("unmanaged", self._lost_window)
window.managed_connect("raised", self._raised_window)
window.managed_connect("pointer-grab", self._pointer_grab)
window.managed_connect("pointer-ungrab", self._pointer_ungrab)
return wid
示例3: _add_new_window_common
# 需要导入模块: from xpra.x11.x11_server_base import X11ServerBase [as 别名]
# 或者: from xpra.x11.x11_server_base.X11ServerBase import _add_new_window_common [as 别名]
def _add_new_window_common(self, window):
windowlog("adding window %s", window)
for prop in window.get_dynamic_property_names():
window.connect("notify::%s" % prop, self._update_metadata)
wid = X11ServerBase._add_new_window_common(self, window)
window.managed_connect("client-contents-changed", self._contents_changed)
window.managed_connect("unmanaged", self._lost_window)
window.managed_connect("raised", self._raised_window)
window.managed_connect("initiate-moveresize", self._initiate_moveresize)
window.managed_connect("grab", self._window_grab)
window.managed_connect("ungrab", self._window_ungrab)
return wid
示例4: _add_new_window_common
# 需要导入模块: from xpra.x11.x11_server_base import X11ServerBase [as 别名]
# 或者: from xpra.x11.x11_server_base.X11ServerBase import _add_new_window_common [as 别名]
def _add_new_window_common(self, window):
wid = X11ServerBase._add_new_window_common(self, window)
window.managed_connect("client-contents-changed", self._contents_changed)
window.managed_connect("unmanaged", self._lost_window)
return wid