Opened 9 years ago
Closed 9 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 )
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
fromxposix/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
'ssetup_client
andunmanageit
(which callsshow_unraised_without_extra_stupid_stuff
ofbindings.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:
Change History (12)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from Antoine Martin to Antoine Martin |
Status: | new → accepted |
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
Milestone: | current → v0.8 |
---|
comment:4 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:7 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:8 Changed 9 years ago by
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
andxkbmap_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
andset_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 workaround can probably be removed now too (maybe add a pygtk.require version check instead)
comment:9 Changed 9 years ago by
Version: | → 0.1.0 |
---|
comment:10 Changed 9 years ago by
Milestone: | v0.8 → 0.1 |
---|
comment:11 Changed 9 years ago by
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 9 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
r548 removes the old gtk workarounds
Done in r351: all releases from now on will accept both
v0.0.7.x
andv0.1.x
In a few months time we can then bump the version to
v0.1.x
without causing incompatibility withv0.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.