! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Fix tasklist size when /force-all-external == TRUE
Status:
RESOLVED: MOVED
Product:
Xfce4-panel
Component:
General

Comments

Description Viktor Odintsev editbugs 2017-09-17 15:42:24 CEST
Created attachment 7320 
Extend GtkSocket and GtkPlug in order to pass min and nat sizes

GtkSocket is designed so it can't get remote minimum and natural sizes, only minimum is gotten.
GtkPlug is designed this way too. It provides only minimum size.

During GTK3 migration the property to control special behavior for tasklist was removed (I didn't remember its name) and replaced with min/nat sizes logic. This logic broke tasklist size in /force-all-external mode.

My approach to fix this problem:

1. I noticed that WM hints can hold a lot of size hints: min size, base size, max size, etc. I decided to use these hints to pass the size.
2. I extended GtkPlug and in the moment GdkWindow gets these hints I provide my own hints for min and base sizes.
3. I extended GtkSocket so it will handle min and base size hints separately allowing to use first one as minimum size and the second one as natural size.

There is a single problem: each time window updates hints, application will get a message for this event. This is useful since I can cache these values and don't call X server to get these sizes every time they required. So GtkSocket does…
GtkSocket uses GdkWindow event handler which doesn't allow other handlers to handle this event in the next. So I can't receive this event but I should get real sizes → I make a new X server call every time. This is more expensive. But in my experience there were no serious consequences. It seems that GtkSocket does this caching only for corner cases but our case is more specific.

Anyway, if somebody can find the solution of this problem, this patch will be a complete solution.
Comment 1 Jason Zaman 2018-06-07 17:18:48 CEST
This may be somewhat related: https://gitlab.gnome.org/GNOME/gtk/merge_requests/164
GtkSocket had the scaling on my HiDPI monitor all wrong so i fixed that upstream, without it a bunch of the icons would be either double or a quarter of the size randomly.
Comment 2 Git Bot editbugs 2020-05-28 02:03:47 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/176.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #13863

Reported by:
Viktor Odintsev
Reported on: 2017-09-17
Last modified on: 2020-05-28

People

Assignee:
Simon Steinbeiss
CC List:
1 user

Version

Version:
4.13.1

Attachments

Additional information