{
GtkWidget *label;
gint x, y;
- gint x_win = 0, y_win = 0;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDisplay *display;
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
if (ct->tip_window) return;
+#if GTK_CHECK_VERSION(3,0,0)
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(
+ gtk_widget_get_window(ct->listview)));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(gtk_widget_get_window(ct->listview),
+ device, &x, &y, NULL);
+#else
gdk_window_get_pointer(gtk_widget_get_window(ct->listview), &x, &y, NULL);
+#endif
ct->tip_info = collection_table_find_data_by_coord(ct, x, y, NULL);
if (!ct->tip_info) return;
gtk_widget_show(label);
#if GTK_CHECK_VERSION(3,0,0)
- gdk_window_get_origin(gtk_widget_get_window(ct->listview), &x_win, &y_win);
+ display = gdk_display_get_default();
+ device_manager = gdk_display_get_device_manager(display);
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_device_get_position(device, NULL, &x, &y);
#else
gdk_window_get_pointer(NULL, &x, &y, NULL);
#endif
if (!gtk_widget_get_realized(ct->tip_window)) gtk_widget_realize(ct->tip_window);
- gtk_window_move(GTK_WINDOW(ct->tip_window), x_win + x + 16, y_win + y + 16);
+ gtk_window_move(GTK_WINDOW(ct->tip_window), x + 16, y + 16);
gtk_widget_show(ct->tip_window);
}
static void tip_update(CollectTable *ct, CollectInfo *info)
{
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDisplay *display = gdk_display_get_default();
+ GdkDeviceManager *device_manager = gdk_display_get_device_manager(display);
+ GdkDevice *device = gdk_device_manager_get_client_pointer(device_manager);
+#endif
+
tip_schedule(ct);
if (ct->tip_window)
{
gint x, y;
-
+#if GTK_CHECK_VERSION(3,0,0)
+ gdk_device_get_position(device, NULL, &x, &y);
+#else
gdk_window_get_pointer(NULL, &x, &y, NULL);
+#endif
gtk_window_move(GTK_WINDOW(ct->tip_window), x + 16, y + 16);
if (info != ct->tip_info)
GtkTreeIter iter;
GtkTreePath *tpath;
GtkTreeViewColumn *column;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
+#if GTK_CHECK_VERSION(3,0,0)
+ if (!use_coord)
+ {
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(
+ gtk_widget_get_window(ct->listview)));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(gtk_widget_get_window(ct->listview),
+ device, &x, &y, NULL);
+ }
+#else
if (!use_coord) gdk_window_get_pointer(gtk_widget_get_window(ct->listview), &x, &y, NULL);
-
+#endif
if (source)
{
gint col;
GdkWindow *window;
gint x, y;
gint w, h;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
if (!ct->drop_idle_id) return FALSE;
window = gtk_widget_get_window(ct->listview);
+#if GTK_CHECK_VERSION(3,0,0)
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(window));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(window, device, &x, &y, NULL);
+#else
gdk_window_get_pointer(window, &x, &y, NULL);
+#endif
w = gdk_window_get_width(window);
h = gdk_window_get_height(window);
if (x >= 0 && x < w && y >= 0 && y < h)
{
PixbufRenderer *pr;
gint accel;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
/* This is a hack, but work far the best, at least for single pointer systems.
* See http://bugzilla.gnome.org/show_bug.cgi?id=587714 for more. */
gint x, y;
+#if GTK_CHECK_VERSION(3,0,0)
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(bevent->window));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(bevent->window, device, &x, &y, NULL);
+#else
gdk_window_get_pointer (bevent->window, &x, &y, NULL);
+#endif
bevent->x = x;
bevent->y = y;
GdkModifierType mask;
gint x, y;
GtkAllocation allocation;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
gtk_widget_get_allocation(button, &allocation);
pixbuf = gdk_pixbuf_get_from_window(gtk_widget_get_window(button),
allocation.x, allocation.y,
allocation.width, allocation.height);
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(button));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(gtk_widget_get_window(button), device, &x, &y, &mask);
#else
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
allocation.width, allocation.height);
gdk_pixbuf_get_from_drawable(pixbuf, gtk_widget_get_window(button), NULL,
allocation.x, allocation.y,
0, 0, allocation.width, allocation.height);
-#endif
gdk_window_get_pointer(gtk_widget_get_window(button), &x, &y, &mask);
+#endif
gtk_drag_set_icon_pixbuf(context, pixbuf,
x - allocation.x, y - allocation.y);
gint x, y;
gint w, h;
gint amt = 0;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
if (sd->max_step < sd->region_size)
{
}
window = gtk_widget_get_window(sd->widget);
+#if GTK_CHECK_VERSION(3,0,0)
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(window));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(window, device, &x, &y, NULL);
+#else
gdk_window_get_pointer(window, &x, &y, NULL);
+#endif
w = gdk_window_get_width(window);
h = gdk_window_get_height(window);
static gboolean vd_auto_scroll_idle_cb(gpointer data)
{
ViewDir *vd = data;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
if (vd->drop_fd)
{
gint w, h;
window = gtk_widget_get_window(vd->view);
+#if GTK_CHECK_VERSION(3,0,0)
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(window));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(window, device, &x, &y, NULL);
+#else
gdk_window_get_pointer(window, &x, &y, NULL);
+#endif
w = gdk_window_get_width(window);
h = gdk_window_get_height(window);
if (x >= 0 && x < w && y >= 0 && y < h)
{
GtkWidget *label;
gint x, y;
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDisplay *display;
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+#endif
if (VFICON(vf)->tip_window) return;
+#if GTK_CHECK_VERSION(3,0,0)
+ device_manager = gdk_display_get_device_manager(gdk_window_get_display(
+ gtk_tree_view_get_bin_window(GTK_TREE_VIEW(vf->listview))));
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_window_get_device_position(gtk_tree_view_get_bin_window(GTK_TREE_VIEW(vf->listview)),
+ device, &x, &y, NULL);
+#else
gdk_window_get_pointer(gtk_tree_view_get_bin_window(GTK_TREE_VIEW(vf->listview)), &x, &y, NULL);
+#endif
VFICON(vf)->tip_id = vficon_find_data_by_coord(vf, x, y, NULL);
if (!VFICON(vf)->tip_id) return;
gtk_container_add(GTK_CONTAINER(VFICON(vf)->tip_window), label);
gtk_widget_show(label);
+#if GTK_CHECK_VERSION(3,0,0)
+ display = gdk_display_get_default();
+ device_manager = gdk_display_get_device_manager(display);
+ device = gdk_device_manager_get_client_pointer(device_manager);
+ gdk_device_get_position(device, NULL, &x, &y);
+#else
gdk_window_get_pointer(NULL, &x, &y, NULL);
+#endif
if (!gtk_widget_get_realized(VFICON(vf)->tip_window)) gtk_widget_realize(VFICON(vf)->tip_window);
gtk_window_move(GTK_WINDOW(VFICON(vf)->tip_window), x + 16, y + 16);
static void tip_update(ViewFile *vf, IconData *id)
{
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkDisplay *display = gdk_display_get_default();
+ GdkDeviceManager *device_manager = gdk_display_get_device_manager(display);
+ GdkDevice *device = gdk_device_manager_get_client_pointer(device_manager);
+#endif
+
if (VFICON(vf)->tip_window)
{
gint x, y;
+#if GTK_CHECK_VERSION(3,0,0)
+ gdk_device_get_position(device, NULL, &x, &y);
+#else
gdk_window_get_pointer(NULL, &x, &y, NULL);
+#endif
gtk_window_move(GTK_WINDOW(VFICON(vf)->tip_window), x + 16, y + 16);
if (id != VFICON(vf)->tip_id)