static void on_highlight_widget (GtkWidget *button, GdkEvent *event, GtkInspectorWindow *iw) { GtkWidget *widget; widget = find_widget_at_pointer (gdk_event_get_device (event)); if (widget == NULL) { /* This window isn't in-process. Ignore it. */ return; } if (gtk_widget_get_toplevel (widget) == GTK_WIDGET (iw)) { /* Don't hilight things in the inspector window */ return; } if (iw->flash_widget == widget) { /* Already selected */ return; } clear_flash (iw); start_flash (iw, widget); }
void gtk_inspector_window_select_widget_under_pointer (GtkInspectorWindow *iw) { GdkDisplay *display; GdkDevice *device; GtkWidget *widget; display = gdk_display_get_default (); device = gdk_seat_get_pointer (gdk_display_get_default_seat (display)); widget = find_widget_at_pointer (device); if (widget) select_widget (iw, widget); }
static void on_inspect_widget (GtkWidget *button, GdkEvent *event, GtkInspectorWindow *iw) { GtkWidget *widget; gdk_window_raise (gtk_widget_get_window (GTK_WIDGET (iw))); clear_flash (iw); widget = find_widget_at_pointer (gdk_event_get_device (event)); if (widget) select_widget (iw, widget); }
void gtk_inspector_window_select_widget_under_pointer (GtkInspectorWindow *iw) { GdkDisplay *display; GdkDeviceManager *dm; GdkDevice *device; GtkWidget *widget; display = gtk_widget_get_display (GTK_WIDGET (iw)); dm = gdk_display_get_device_manager (display); device = gdk_device_manager_get_client_pointer (dm); widget = find_widget_at_pointer (device); if (widget) select_widget (iw, widget); }