xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #2162: resize-not-reinit.patch

File resize-not-reinit.patch, 1.3 KB (added by totaamwin32, 3 years ago)

proposed fix: don't re-init, use a resize

  • xpra/client/mixins/display.py

     
    567567            if self.max_window_size!=(0, 0):
    568568                minx, miny = self.max_window_size
    569569            return max(1, min(minx, iround(w*xchange))), max(1, min(miny, iround(h*ychange)))
    570         self.reinit_windows(new_size_fn)
     570        self.resize_windows(new_size_fn)
    571571        self.reinit_window_icons()
    572572        self.emit("scaling-changed")
    573573
  • xpra/client/mixins/window_manager.py

     
    861861        for window in self._id_to_window.values():
    862862            window.deiconify()
    863863
     864    def resize_windows(self, new_size_fn):
     865        log.warn("resize_windows")
     866        for window in self._id_to_window.values():
     867            if window:
     868                ww, wh = window._size
     869                nw, nh = new_size_fn(ww, wh)
     870                window.resize(nw, nh)
     871        self.send_refresh_all()
     872       
    864873
    865874    def reinit_window_icons(self):
    866875        #make sure the window icons are the ones we want: