[Wayland-bugs] [Bug 720256] New: GtkScaleButton popup appears positioned randomly on the screen
gtk+ (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Dec 11 06:48:47 PST 2013
https://bugzilla.gnome.org/show_bug.cgi?id=720256
gtk+ | wayland | unspecified
Summary: GtkScaleButton popup appears positioned randomly on
the screen
Classification: Platform
Product: gtk+
Version: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: wayland
AssignedTo: gtk-bugs at gtk.org
ReportedBy: pochu27 at gmail.com
QAContact: gtk-bugs at gtk.org
CC: rob at robster.org.uk, wayland-bugs at lists.freedesktop.org
GNOME version: ---
On wayland, GtkScaleButton's popup doesn't appear on top of the button, but
randomly on the screen. This is because gtk_window_move() has no effect for
normal toplevel windows or windows that are not transient. Indeed, making the
pop transient with something like:
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -911,6 +911,9 @@ gtk_scale_popup (GtkWidget *widget,
x += allocation.x;
y += allocation.y;
+ gtk_window_set_transient_for (GTK_WINDOW (priv->dock),
+ GTK_WINDOW (gtk_widget_get_toplevel
(widget)));
+
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
gtk_window_move (GTK_WINDOW (priv->dock), x, y - (SCALE_SIZE / 2));
else
makes the popup properly positioned. This works with gtk+-3.10 but may not work
with gtk+ 3.11/master because of the switch to the xdg-shell protocol. I
haven't tested that.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Wayland-bugs
mailing list