Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor the window attributes and signal code #907

Closed
totaam opened this issue Jul 3, 2015 · 8 comments
Closed

refactor the window attributes and signal code #907

totaam opened this issue Jul 3, 2015 · 8 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 3, 2015

As it's a bit of a mess...

In particular:

  • keep in mind wishlist: Support multiple clients connected at the same time #41..
  • try to reduce the duplication between the window models, WM and the server's view
  • cleaner abstraction of the "window model" interface
  • remove redundant attributes (is_OR vs "override-redirect" property, is_shadow, etc..)
  • move some wm-state attributes so OR windows can use them (at least focus?)
  • more consistent property change code
  • fixup geometry issues (and try to get rid of the ownership election stuff)
  • make it less dependent on gtk2 whilst we're at it
  • maybe move all _handle_XXXX methods to a util class?
  • generalize NET_WM_ALLOWED_ACTIONS?
  • maybe consider the eventual move to GTK3? meh, if so we will need to replace add_event_receiver / remove_event_receiver with a WeakKeyDictionary
  • maybe a new form of _internal_set_property can check if the value has actually changed? (no need to send a notify() if it hasn't)

List of API calls to deal with:

  • get_default_window_icon
  • _guess_window_type
  • do_get_property_can_focus just update the "can-focus" property instead
  • x11_get_server_time - rewrite in Cython
  • read_initial_properties and X11 properties, it's a mess
  • call_setup() is inconsistent, it's called for OR and tray, but we call it for "normal" windows
  • WM_PROTOCOLS -> XGetWMProtocols
  • WM_CLIENT_MACHINE -> XGetWMClientMachine
  • attention-requested: shouldn't we clear this when "urgency" is not in the wm_hints?
  • set_active - maybe this should be a method on WM instead?
@totaam
Copy link
Collaborator Author

totaam commented Jul 3, 2015

2015-07-03 17:44:42: antoine uploaded file split-windowmodel.patch (633.7 KiB)

better patch

@totaam
Copy link
Collaborator Author

totaam commented Jul 4, 2015

2015-07-04 06:41:56: antoine uploaded file split-windowmodel-v2.patch (637.7 KiB)

much cleaner patch

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2015

Huge changeset in r9822 - see commit message.
If needed, it should be possible to revert those changes easily enough for testing.. so far.

Still TODO:

@totaam
Copy link
Collaborator Author

totaam commented Sep 26, 2015

Moving the geometry bits to #990 (the rest is in pretty good shape already)

@totaam
Copy link
Collaborator Author

totaam commented Oct 16, 2015

2015-10-16 09:32:36: antoine commented


Note: on centos 7.x, we get tons of warnings like these:

/usr/lib64/python2.7/site-packages/gobject/__init__.py:115: Warning: Attempt to add property xpra+x11+gtk2+models+or_window+OverrideRedirectWindowModel::size-hints after class was initialised
  type_register(cls, namespace.get('__gtype_name__'))
/usr/lib64/python2.7/site-packages/gobject/__init__.py:115: Warning: Attempt to add property xpra+x11+gtk2+models+or_window+OverrideRedirectWindowModel::frame after class was initialised
  type_register(cls, namespace.get('__gtype_name__'))

Which is caused by this bug: [https://bugzilla.gnome.org/show_bug.cgi?id=698614] (hopefully will be backported to centos 7.x soon).

AFAICT, it is not possible to workaround this warning with pygobject (see the two attempts at subclassing attached below).

@totaam
Copy link
Collaborator Author

totaam commented Oct 16, 2015

2015-10-16 09:33:47: antoine uploaded file gobject_subclassing.py (1.7 KiB)

example triggering the centos 7 warning

@totaam
Copy link
Collaborator Author

totaam commented Oct 16, 2015

2015-10-16 09:34:03: antoine uploaded file gobject_subclassing2.py (1.4 KiB)

another example triggering the centos 7 warning

@totaam
Copy link
Collaborator Author

totaam commented Oct 28, 2015

Lots more work on this done as part of #990 - this will do for this release.

Will follow up in #1034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant