Skip to content

Commit

Permalink
continue even if we can't create the cursor we want to use
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 3, 2023
1 parent 716ad46 commit 3eae460
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xpra/client/gtk_base/session_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,14 @@ def populate_all(self):

def add_graph_button(self, tooltip, click_cb):
button = Gtk.EventBox()
try:
arrow_down = Gdk.Cursor.new(Gdk.CursorType.BASED_ARROW_DOWN)
except TypeError:
arrow_down = None
def set_cursor(widget):
cursor = Gdk.Cursor.new(Gdk.CursorType.BASED_ARROW_DOWN)
widget.get_window().set_cursor(cursor)
button.connect("realize", set_cursor)
widget.get_window().set_cursor(arrow_down)
if arrow_down:
button.connect("realize", set_cursor)
graph = Gtk.Image()
graph.set_size_request(0, 0)
button.connect("button_press_event", click_cb, graph)
Expand Down

0 comments on commit 3eae460

Please sign in to comment.