Skip to content

Commit

Permalink
#1364 / #41: always damage the window on map / configure events, even…
Browse files Browse the repository at this point in the history
… if not the "ui-driver", and if not shown yet - show it

git-svn-id: https://xpra.org/svn/Xpra/trunk@14460 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 19, 2016
1 parent 3b94491 commit 55cce4f
Showing 1 changed file with 42 additions and 40 deletions.
82 changes: 42 additions & 40 deletions src/xpra/x11/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,15 +766,12 @@ def _process_map_window(self, proto, packet):
self._set_client_properties(proto, wid, window, packet[6])
if not self.ui_driver:
self.ui_driver = ss.uuid
elif self.ui_driver!=ss.uuid:
return
if self._desktop_manager.is_shown(window):
return
if len(packet)>=8:
self._set_window_state(proto, wid, window, packet[7])
ax, ay, aw, ah = self._clamp_window(proto, wid, window, x, y, w, h)
self._desktop_manager.configure_window(window, ax, ay, aw, ah)
self._desktop_manager.show_window(window)
if self.ui_driver==ss.uuid or not self._desktop_manager.is_shown(window):
if len(packet)>=8:
self._set_window_state(proto, wid, window, packet[7])
ax, ay, aw, ah = self._clamp_window(proto, wid, window, x, y, w, h)
self._desktop_manager.configure_window(window, ax, ay, aw, ah)
self._desktop_manager.show_window(window)
self._damage(window, 0, 0, w, h)


Expand Down Expand Up @@ -842,39 +839,44 @@ def _process_configure_window(self, proto, packet):
self._set_client_properties(proto, wid, window, cprops)
if not self.ui_driver:
self.ui_driver = ss.uuid
elif self.ui_driver!=ss.uuid and self._desktop_manager.is_shown(window):
return
if len(packet)>=13:
pwid = packet[10]
pointer = packet[11]
modifiers = packet[12]
#only update modifiers if the window is in focus:
if self._has_focus==wid:
self._update_modifiers(proto, wid, modifiers)
self._process_mouse_common(proto, pwid, pointer)
damage = False
if window.is_tray():
assert self._tray
if not skip_geometry:
traylog("tray %s configured to: %s", window, (x, y, w, h))
self._tray.move_resize(window, x, y, w, h)
shown = self._desktop_manager.is_shown(window)
if self.ui_driver==ss.uuid or not shown:
damage = False
if len(packet)>=13:
pwid = packet[10]
pointer = packet[11]
modifiers = packet[12]
#only update modifiers if the window is in focus:
if self._has_focus==wid:
self._update_modifiers(proto, wid, modifiers)
self._process_mouse_common(proto, pwid, pointer)
if window.is_tray():
assert self._tray
if not skip_geometry:
traylog("tray %s configured to: %s", window, (x, y, w, h))
self._tray.move_resize(window, x, y, w, h)
damage = True
else:
assert skip_geometry or not window.is_OR(), "received a configure packet with geometry for OR window %s from %s: %s" % (window, proto, packet)
self.last_client_configure_event = time.time()
if len(packet)>=9:
changes = self._set_window_state(proto, wid, window, packet[8])
damage |= len(changes)>0
if not skip_geometry:
resize_counter = 0
if len(packet)>=8:
resize_counter = packet[7]
owx, owy, oww, owh = self._desktop_manager.window_geometry(window)
geomlog("_process_configure_window(%s) old window geometry: %s", packet[1:], (owx, owy, oww, owh))
ax, ay, aw, ah = self._clamp_window(proto, wid, window, x, y, w, h, resize_counter)
self._desktop_manager.configure_window(window, ax, ay, aw, ah, resize_counter)
damage |= owx!=ax or owy!=ay or oww!=aw or owh!=ah
if not shown:
self._desktop_manager.show_window(window)
damage = True
self.repaint_root_overlay()
else:
assert skip_geometry or not window.is_OR(), "received a configure packet with geometry for OR window %s from %s: %s" % (window, proto, packet)
self.last_client_configure_event = time.time()
if len(packet)>=9:
changes = self._set_window_state(proto, wid, window, packet[8])
damage = len(changes)>0
if not skip_geometry:
resize_counter = 0
if len(packet)>=8:
resize_counter = packet[7]
owx, owy, oww, owh = self._desktop_manager.window_geometry(window)
geomlog("_process_configure_window(%s) old window geometry: %s", packet[1:], (owx, owy, oww, owh))
ax, ay, aw, ah = self._clamp_window(proto, wid, window, x, y, w, h, resize_counter)
self._desktop_manager.configure_window(window, ax, ay, aw, ah, resize_counter)
damage |= owx!=ax or owy!=ay or oww!=aw or owh!=ah
self.repaint_root_overlay()
damage = True
if damage:
self.schedule_configure_damage(wid)

Expand Down

0 comments on commit 55cce4f

Please sign in to comment.