Skip to content

Commit

Permalink
#3769 MacOS workaround for GTK breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Mar 9, 2023
1 parent dd264ac commit d772a66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion xpra/client/gl/gl_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#"NVIDIA Corporation",
],
"platform" : [
"darwin", #latest builds fail to render on MacOS
#"darwin",
],
}

Expand Down
7 changes: 7 additions & 0 deletions xpra/client/gl/gtk3/gl_client_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def spinner(self, ok):
w, h = self.get_size()
self.repaint(0, 0, w, h)

def queue_draw_area(self, x, y, w, h):
b = self._backing
if not b:
return
rect = (x, y, w, h)
b.gl_expose_rect(rect)

def monitor_changed(self, monitor):
super().monitor_changed(monitor)
da = self.drawing_area
Expand Down
3 changes: 3 additions & 0 deletions xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ def init_drawing_area(self):
self.add(widget)

def repaint(self, x, y, w, h):
if OSX:
self.queue_draw_area(x, y, w, h)
return
widget = self.drawing_area
#log("repaint%s widget=%s", (x, y, w, h), widget)
if widget:
Expand Down

0 comments on commit d772a66

Please sign in to comment.