xpra icon
Bug tracker and wiki

Opened 7 years ago

Closed 7 years ago

#57 closed task (fixed)

simplify code: drop compatibility for older versions

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.1
Component: android Version: 0.1.0
Keywords: Cc:

Description (last modified by Antoine Martin)

There are a number of places where the old code is holding us back:

  • packet-size feature
  • key-repeat
  • raw keycodes
  • default keymaps
  • encodings
  • modifiers (ie: remove old mode "clear" + "add" as text, and remove modifiers_fallback from xposix/gui.py - see r435)* ping

etc..
And some workarounds for bugs that are no longer present:

  • gtk #462368 in WorldWindow - fix applied in 2007
  • gtk #526635 in WindowModel's setup_client and unmanageit (which calls show_unraised_without_extra_stupid_stuff of bindings.pyx) - fix applied in 2008

And maybe more

It means that there are more than one codepath for many important functions, this makes it hard to read and debug, requires more testing (with older versions), etc

At some point we just have to drop compatibility with older versions.
I think we should set v0.0.7.32 as the starting point, allow it to connect to v0.1.x (one major version up) and then drop all compatibility code in v0.2.x to remove all the version cruft.

See also:

  • #68: bencoder
  • #62: crazy keyboard modifiers mess
  • #54: "set_deflate": we can remove 'enable_deflate' (since r409)

Change History (12)

comment:1 Changed 7 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Antoine Martin
Status: newaccepted

comment:2 Changed 7 years ago by Antoine Martin

Done in r351: all releases from now on will accept both v0.0.7.x and v0.1.x
In a few months time we can then bump the version to v0.1.x without causing incompatibility with v0.0.7.x
We may even be able to start dropping feature tests by simply relying on versions >= v0.0.7.2x, when most of the keyboard stuff got added.

comment:3 Changed 7 years ago by Antoine Martin

Milestone: currentv0.8

comment:4 Changed 7 years ago by Antoine Martin

Description: modified (diff)

comment:5 Changed 7 years ago by Antoine Martin

Description: modified (diff)

comment:6 Changed 7 years ago by Antoine Martin

Description: modified (diff)

comment:7 Changed 7 years ago by Antoine Martin

Description: modified (diff)

comment:8 Changed 7 years ago by Antoine Martin

r514 only supports v0.0.7.35 and later, which allows us to remove:

  • old racy deflate code
  • the features can_ping, dynamic_compression, _raw_keycodes_feature, _raw_keycodes_full, keyboard_as_properties, _send_rowstride, key_repeat_modifiers, send_damage_sequence, send_nuisance_modifiers and _focus_modifiers_feature are all assumed supported. Some of these flags may still be sent for backwards compatibility with the v0.0.7.x branch, but these will be dropped soon too.
  • xmodmap_data, xkbmap_mod_clear and xkbmap_mod_add: these were the old plain-text/unparsed data now replaced by proper data structures.
  • --disable-mmap (use --no-mmap)
  • _keycode and _keycode_from_keyname guessing methods were no longer needed as we now always use raw keycodes from the client.
  • exec_xmodmap which used the 'xmodmap' X11 binary is no more, we now use native code for most things (except for the initial layout which still uses 'setxkbmap' and 'xkbcomp').
  • parse_xmodmap and set_xmodmap_from_text which duplicated the xmodmap C code.

Also, notification, bell and cursors forwarding can be toggled on the server so we don't bother sending it at all rather than ignoring it client-side, saves bandwidth when not used.

Remaining tasks:

  • encodings will probably stay: no harm in supporting clients with fewer dependencies (no 'PIL' aka Python Imaging Library)
  • packet-size feature needs to be added to the Java and Android clients before we can enable it unconditionally
  • The GTK workarounds can probably be removed now too (maybe add a pygtk.require version check instead)
Last edited 7 years ago by Antoine Martin (previous) (diff)

comment:9 Changed 7 years ago by Antoine Martin

Version: 0.1.0

comment:10 Changed 7 years ago by Antoine Martin

Milestone: v0.80.1

comment:11 Changed 7 years ago by Antoine Martin

r519 makes the packet-size feature mandatory and adds support for it to the Java / Android code. Maybe 0.1 / 0.2 would be a good time to change this to a better format? (binary with reserved space?)

comment:12 Changed 7 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

r548 removes the old gtk workarounds

Note: See TracTickets for help on using tickets.