Merge branch 'gtk-4-14-backports' into 'gtk-4-14'
Backport 7237 and 7492 into 4.14 See merge request GNOME/gtk!7503
This commit is contained in:
@@ -257,6 +257,10 @@ filechooser_quartz_launch (FileChooserQuartzData *data)
|
||||
{
|
||||
[panel setCanChooseDirectories:YES];
|
||||
[panel setCanChooseFiles:NO];
|
||||
if (data->create_folders)
|
||||
{
|
||||
[panel setCanCreateDirectories:YES];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -366,9 +366,10 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
|
||||
GdkSeat *seat;
|
||||
GdkDevice *device;
|
||||
GdkSurface *surface;
|
||||
double x, y;
|
||||
graphene_point_t p;
|
||||
double px, py;
|
||||
int x, y;
|
||||
GtkWidget *toplevel;
|
||||
GtkWidget *target_widget;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
@@ -381,7 +382,7 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
|
||||
else
|
||||
device = NULL;
|
||||
if (device)
|
||||
surface = gdk_device_get_surface_at_position (device, &x, &y);
|
||||
surface = gdk_device_get_surface_at_position (device, &px, &py);
|
||||
else
|
||||
surface = NULL;
|
||||
if (!surface)
|
||||
@@ -395,10 +396,12 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
|
||||
if (gtk_native_get_surface (GTK_NATIVE (toplevel)) != surface)
|
||||
return;
|
||||
|
||||
if (!gtk_widget_compute_point (toplevel, widget, &GRAPHENE_POINT_INIT (x, y), &p))
|
||||
graphene_point_init (&p, x, y);
|
||||
x = round (px);
|
||||
y = round (py);
|
||||
|
||||
gtk_tooltip_handle_event_internal (GDK_MOTION_NOTIFY, surface, widget, p.x, p.y);
|
||||
target_widget = _gtk_widget_find_at_coords (surface, x, y, &x, &y);
|
||||
|
||||
gtk_tooltip_handle_event_internal (GDK_MOTION_NOTIFY, surface, target_widget, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user