Skip to content

Commit

Permalink
#2744 add backing info, generalize so tray windows also get something
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@26889 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 5, 2020
1 parent 45fcc6a commit 746f8f8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
11 changes: 11 additions & 0 deletions src/xpra/client/client_widget_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ def __init__(self, client, watcher_pid, wid, has_alpha):
self._backing = None
self.pixel_depth = 24

def get_info(self):
info = {
"has-alpha" : self._has_alpha,
"window-alpha" : self._window_alpha,
"pixel-depth" : self.pixel_depth,
}
b = self._backing
if b:
info["backing"] = b.get_info()
return info

def make_new_backing(self, backing_class, ww, wh, bw, bh):
#size of the backing (same as server window source):
bw = max(1, bw)
Expand Down
7 changes: 4 additions & 3 deletions src/xpra/client/client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def get_info(self):
attributes.append("iconified")
if self._focused:
attributes.append("focused")
return {
info = super().get_info()
info.update({
"override-redirect" : self._override_redirect,
#"group-leader" : self.group_leader,
"position" : self._pos,
Expand All @@ -152,9 +153,9 @@ def get_info(self):
#cursor_data
"max-size" : self.max_window_size,
"button-state" : self.button_state,
"pixel-depth" : self.pixel_depth,
"offset" : self.window_offset,
}
})
return info

def get_desktop_workspace(self):
return None
Expand Down
6 changes: 4 additions & 2 deletions src/xpra/client/gtk_base/cairo_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ def init(self, ww : int, wh : int, bw : int, bh : int):
self.create_surface()

def get_info(self):
return {
info = super().get_info()
info.update({
"type" : "Cairo",
"rgb-formats" : self.RGB_MODES,
}
})
return info


def create_surface(self):
Expand Down

0 comments on commit 746f8f8

Please sign in to comment.