I'm using XFCE 4.13 components on Ubuntu MinimalCD 18.04. The latest version of xfwm4 doesn't take into consideration window scaling at 2x, and when you maximize windows they go behind the panel(s), since xfwm thinks they're half the size. To reproduce, set window scaling to 2x and try to maximize a window. Might also be a xfce4-panel bug declaring it's half its actual size, not sure how the implementation looks like.
Could you attach a screenshot of the issue please?
Actually, it's a panel bug, the partial struts set by xfce4-panel when GDK_SCALE=2 are completely wrong.
Created attachment 7530 Screenshot of problem I'm on my cell and have not installed anything to take a screenshot, but I was able to take a picture.
@fourdan: I have attached a screenshot. Should I change the title of the bug (I guess so)?
Created attachment 7673 0001-panel-port-to-GdkDisplay-GdkMonitor.patch I ported everything in panel/ to use GdkDisplay and GdkMonitor, it fixes the struts too when scaling. A few of the external plugins dont scale properly but I think those are still on gtk2. Author: Jason Zaman <jason at perfinion.com> Date: Mon Apr 16 01:15:32 2018 panel: port to GdkDisplay & GdkMonitor GdkScreen is deprecated since Gdk 3.22. Should use GdkDisplay or GdkMonitor instead. Also there is only ever one GdkScreen per GdkDisplay. Can have many GdkMonitors tho. Bug: https://bugzilla.xfce.org/show_bug.cgi?id=14155 Signed-off-by: Jason Zaman <jason at perfinion.com>
Very nice. How to apply the patch? Is it in some repo..? Thanks!
@Niccolo, i attached it to the comment above (or on the right bar). it applies on top of xfce4-panel master branch. more testing would be great especially if you have a HiDPI monitor :)
+ name = g_strdup(gdk_monitor_get_model (monitor)); if (panel_str_is_empty (name)) { - g_free (name); - gdk_monitor_get_model is transfer:none, ie you don't need to free what it returns. However, you strdup it, so you do still have to free the result of that, in the case that the string is "" at least. In general I like the idea of cleaning up the monitor/plug/screen number stuff. It's been a problem for a while, eg https://bugzilla.xfce.org/show_bug.cgi?id=10725#c13
@Jason: yes, I figured it out eventually, it was confusing on mobile since Bugzilla is barely usable (on landscape, totally broken on portrait). I've been using your patched version for a few days, and I have noticed no problems. It works great! I think it would help a lot if Xfce's repo on GitHub accepted pull requests, though. As much as people might dislike GitHub for phylosophical reasons, it works about 1000 times better than Bugzilla, and would make it a lot easier to collaborate.
(In reply to Alistair Buxton from comment #8) > However, you strdup it, so you do still have to free the result of that, in > the case that the string is "" at least. Oops, good catch, fixed. yeah i removed the free first then i realized with the rest of the code it was easier to just strdup it but then forgot the free() :(. > In general I like the idea of cleaning up the monitor/plug/screen number > stuff. It's been a problem for a while, eg > https://bugzilla.xfce.org/show_bug.cgi?id=10725#c13 Yeah there is still some more work to do, I fixed everything in panel/. There are a few in libxfce4panel/ that i tried to clean up but not worth it since it still needs to support gtk2 for the compat wrapper for now. They are easy to fix but you'd need a ton of ifdef gtk3 everywhere so it can wait. There are still a couple issues in plugins/ that I have not gotten to yet. The main ones are tasklist and systray. they dont appear to cause problems tho even in scale=2 mode. My main motivation for the panel/ GdkScreen->GdkMonitor was that i needed the struts fixed and didnt want to do a hack job so i cleaned up the whole dir. There are some issues with external plugins that are still using gtk2 but dont scale right that need fixing too. the ones I use are systemload-plugin and netload-plugin. (In reply to Niccolo Brogi from comment #9) > I've been using your patched version for a few days, and I have noticed no > problems. It works great! > > I think it would help a lot if Xfce's repo on GitHub accepted pull requests, > though. As much as people might dislike GitHub for phylosophical reasons, it > works about 1000 times better than Bugzilla, and would make it a lot easier > to collaborate. I fixed up the strdup/free issue and split into many smaller patches here: https://github.com/perfinion/xfce4-panel/commits/monitor The issue with github is that their main repos are at git.xfce.org. they could do like we do in gentoo and allow PR's just the devs dont use the auto merge button but git fetch github pull/1234/head; git merge FETCH_HEAD then push to the main repo.
That attached patch fixed the problem for me too.
Patch works great. There are still problem with multiple monitors: when a bottom panel is on the primary display, its size is not taken into account.
(In reply to Niccolo Brogi from comment #12) > There are still problem with multiple monitors: when a bottom panel is on > the primary display, its size is not taken into account. Can you explain more? I have dual monitors (4k on the left as primary monitor, and 1080p on the right). I use the patches i submitted to bug 14346 to make the 1080p double so they line up the same. I have top and bottom panels on the left monitor and none on the right and the struts work fine when i maximise stuff. Do you mean some other size? If you see problems with some of the panel plugins only taking up a quarter of the size they should, I submitted some PRs to fix GtkSockets: https://gitlab.gnome.org/GNOME/gtk/merge_requests/164 https://gitlab.gnome.org/GNOME/gtk/merge_requests/165
(In reply to Jason Zaman from comment #13) […] > If you see problems with some of the panel plugins only taking up a quarter > of the size they should, I submitted some PRs to fix GtkSockets: > https://gitlab.gnome.org/GNOME/gtk/merge_requests/164 > https://gitlab.gnome.org/GNOME/gtk/merge_requests/165 Thank you. I applied your patch on top of GTK+ 3.22.30, and it fixed the issue for me. See bug 14424 [1] for a small glitch with xfce4-terminal. [1]: https://bugzilla.xfce.org/show_bug.cgi?id=14424
Should now be fixed in git master.