Skip to content

Commit

Permalink
#1656: fixup r17164:
Browse files Browse the repository at this point in the history
* use the render_size when calculating the padding around the backing
* move render_size to WindowBackingBase superclass since all window backings support it

git-svn-id: https://xpra.org/svn/Xpra/trunk@17190 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 15, 2017
1 parent 524ad4e commit e79f83b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ class GLWindowBackingBase(WindowBackingBase):

def __init__(self, wid, window_alpha, pixel_depth=0):
self.wid = wid
self.size = 0, 0
self.render_size = 0, 0
self.texture_pixel_format = None
#this is the pixel format we are currently updating the fbo with
#can be: "YUV420P", "YUV422P", "YUV444P", "GBRP" or None when not initialized yet.
Expand Down
9 changes: 5 additions & 4 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,11 @@ def window_state_updated(self, widget, event):
def update_window_state(self, state_updates):
if state_updates.get("maximized") is False or state_updates.get("fullscreen") is False:
#if we unfullscreen or unmaximize, re-calculate offsets if we have any:
if self.window_offset!=(0, 0):
w, h = self._backing.size
w, h = self._backing.render_size
ww, wh = self.get_size()
log("update_window_state(%s) unmax / unfullscreen - window_offset=%s, backing render_size=%s, window size=%s", state_updates, self.window_offset, (w, h), (ww, wh))
if self._backing.offsets!=(0, 0, 0, 0):
self.center_backing(w, h)
ww, wh = self.get_size()
self.queue_draw(0, 0, ww, wh)
#decide if this is really an update by comparing with our local state vars:
#(could just be a notification of a state change we already know about)
Expand Down Expand Up @@ -1300,7 +1301,7 @@ def resize(self, w, h, resize_counter=0):
self._backing.offsets = 0, 0, 0, 0
else:
self.center_backing(w, h)
geomlog("backing offsets=%s, window offset=%s", self._backing.offsets, self.window_offset)
geomlog.info("backing offsets=%s, window offset=%s", self._backing.offsets, self.window_offset)
self._set_backing_size(w, h)
self.queue_draw(0, 0, ww, wh)

Expand Down
1 change: 1 addition & 0 deletions src/xpra/client/window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, wid, window_alpha):
load_video_decoders()
self.wid = wid
self.size = 0, 0
self.render_size = 0, 0
self.offsets = 0, 0, 0, 0 #top,left,bottom,right
self._alpha_enabled = window_alpha
self._backing = None
Expand Down

0 comments on commit e79f83b

Please sign in to comment.