Closed balazs-endresz closed 1 year ago
To fix these warnings, line 336 can be changed to:
gdk_window_get_origin (gtk_widget_get_window (gtk_widget_get_parent (GTK_WIDGET(tl))), &x_offset, &y_offset);
and line 360 changed to:
GList* children = gtk_container_get_children (GTK_CONTAINER(tl));
This builds with only deprecation warnings, runs fine, and doesn't depend on the compiler to figure out how to fix a pointer issue
Thanks, I've just added those in.
And I forgot to test this with grouping enabled. I'll add another PR soon, that shouldn't be too difficult to fix now.
Fixes #1315
Instead of randomly positioning the preview windows over the window list applet this centers them properly.
I've tested it on Ubuntu 22.04, with all orientations, 2x scaling, many windows opened (so that previews are not cut off at the edges), and at least plugging in a secondary monitor didn't cause any issues either.
One thing that might be worth pointing out is
gtk_window_set_position + GTK_WIN_POS_MOUSE
followed bygtk_window_get_position
returned incorrect coordinates: e.g. it was zero for the first about 40 pixels. So this gets the mouse position differently. This newer method is actually also used inpanel_toplevel_contains_pointer
.The tooltips are still not aligned properly but I think that could be done in a follow up. Maybe even in
libwnck
instead. I might give that a try at some point.