Skip to content

Commit

Permalink
#1100: save and restore window icon
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@11835 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 4, 2016
1 parent a024754 commit fae4140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/xpra/client/client_widget_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, client, wid, has_alpha):
#tells us if this window instance can paint with alpha
self._window_alpha = False
self._client = client
self._current_icon = None

def make_new_backing(self, backing_class, ww, wh, bw, bh):
#size of the backing (same as server window source):
Expand Down
4 changes: 4 additions & 0 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2536,6 +2536,7 @@ def fake_send(*args):
metadata = window._metadata
override_redirect = window._override_redirect
backing = window._backing
current_icon = window._current_icon
delta_pixel_data, video_decoder, csc_decoder, decoder_lock = None, None, None, None
try:
if backing:
Expand Down Expand Up @@ -2575,6 +2576,8 @@ def fake_send(*args):
backing._video_decoder = video_decoder
backing._csc_decoder = csc_decoder
backing._decoder_lock = decoder_lock
if current_icon:
window.update_icon(*current_icon)
finally:
if decoder_lock:
decoder_lock.release()
Expand Down Expand Up @@ -2790,6 +2793,7 @@ def _process_window_icon(self, packet):
iconlog("_process_window_icon(%s, %s, %s, %s, %s bytes) window=%s", wid, w, h, pixel_format, len(data), window)
if window:
window.update_icon(w, h, pixel_format, data)
window._current_icon = (w, h, pixel_format, data)

def _process_configure_override_redirect(self, packet):
wid, x, y, w, h = packet[1:6]
Expand Down

0 comments on commit fae4140

Please sign in to comment.