xpra icon
Bug tracker and wiki

Opened 9 months ago

Closed 9 months ago

#2533 closed defect (fixed)

xpra upgrade subcommand regression

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 4.0
Component: server Version: 3.0.x
Keywords: Cc: stdedos@…

Description

As reported in ticket:2524#comment:3.

Easily reproducible, also affects version 3 with both python2 and python3.
Odd because I'm pretty sure I had tested this when I added the "upgrade-desktop" and "upgrade-shadow" subcommands.

Change History (6)

comment:1 Changed 9 months ago by stdedos

Cc: stdedos@… added

comment:2 Changed 9 months ago by Antoine Martin

Cc: stdedos@… removed
Status: newassigned

Bisecting:

So the problem is r20757 and it's a big changeset...

comment:3 Changed 9 months ago by stdedos

Cc: stdedos@… added

Isn't CC how you watch a ticket in Trac?

I hope it's okay to track when this is fixed - especially since it seems it will be a bit long time. :/

comment:4 Changed 9 months ago by Antoine Martin

Starting from r20757 and reverting the changes to selection.py fixes the problem.
Narrowing it further points to this specific change:

self.clipboard.set_with_data([("VERSION", 0, 0)],
	                                     self._get,
	                                     self._clear,
	                                     None)

changed to:

set_clipboard_data(self.clipboard, "VERSION")

That's because although the documentation does refer to it, set_with_data is no longer exposed with GTK3: gtk_clipboard_set_with_data/set_with_owner is binding-unfriendly.

So we need to change two things:

  • set the version using something equivalent to:
    outdata.set("INTEGER", 32, pack("@ii", 2, 0))
    
  • catch the selection clear event and emit selection-lost

comment:5 Changed 9 months ago by Antoine Martin

Working fix in r24834 + r24835.

Still TODO:

  • find a way to use the correct format for setting the VERSION - GTK3 lacks the feature which GTK2 has always had
  • add a timeout when trying to upgrade
  • backports
Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:6 Changed 9 months ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Updates:

  • VERSION fix moved to #2535 - things work without, but we should be spec compliant (GTK2 was...)
  • r24837 adds a timeout, we now exit and return exit_codes.TIMEOUT if the current owner does not give up the selection
  • r24838 cleanup + docstring
  • r24839 backports
Note: See TracTickets for help on using tickets.