mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 19:00:12 +00:00
gtk: gdk_drawable_get_display() => gdk_window_get_display()
This commit is contained in:
parent
7f486231ac
commit
2ee8fdb79b
@ -1934,7 +1934,7 @@ text_view_visibility_notify_event (GtkWidget *text_view,
|
|||||||
GList *devices, *d;
|
GList *devices, *d;
|
||||||
gint wx, wy, bx, by;
|
gint wx, wy, bx, by;
|
||||||
|
|
||||||
display = gdk_drawable_get_display (event->window);
|
display = gdk_window_get_display (event->window);
|
||||||
device_manager = gdk_display_get_device_manager (display);
|
device_manager = gdk_display_get_device_manager (display);
|
||||||
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
||||||
|
|
||||||
|
@ -1905,7 +1905,7 @@ _gtk_clipboard_handle_event (GdkEventOwnerChange *event)
|
|||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GtkClipboard *clipboard;
|
GtkClipboard *clipboard;
|
||||||
|
|
||||||
display = gdk_drawable_get_display (event->window);
|
display = gdk_window_get_display (event->window);
|
||||||
clipboard = clipboard_peek (display, event->selection, TRUE);
|
clipboard = clipboard_peek (display, event->selection, TRUE);
|
||||||
|
|
||||||
if (clipboard)
|
if (clipboard)
|
||||||
|
@ -3153,7 +3153,7 @@ set_icon_stock_pixbuf (GdkDragContext *context,
|
|||||||
else
|
else
|
||||||
g_object_ref (pixbuf);
|
g_object_ref (pixbuf);
|
||||||
|
|
||||||
display = gdk_drawable_get_display (context->source_window);
|
display = gdk_window_get_display (context->source_window);
|
||||||
width = gdk_pixbuf_get_width (pixbuf);
|
width = gdk_pixbuf_get_width (pixbuf);
|
||||||
height = gdk_pixbuf_get_height (pixbuf);
|
height = gdk_pixbuf_get_height (pixbuf);
|
||||||
|
|
||||||
|
@ -4053,7 +4053,7 @@ set_invisible_cursor (GdkWindow *window)
|
|||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkCursor *cursor;
|
GdkCursor *cursor;
|
||||||
|
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_window_get_display (window);
|
||||||
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
|
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
|
||||||
|
|
||||||
gdk_window_set_cursor (window, cursor);
|
gdk_window_set_cursor (window, cursor);
|
||||||
|
@ -912,7 +912,7 @@ set_invisible_mouse_cursor (GdkWindow *window)
|
|||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkCursor *cursor;
|
GdkCursor *cursor;
|
||||||
|
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_window_get_display (window);
|
||||||
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
|
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
|
||||||
|
|
||||||
gdk_window_set_cursor (window, cursor);
|
gdk_window_set_cursor (window, cursor);
|
||||||
|
@ -815,7 +815,7 @@ gtk_hsv_button_release (GtkWidget *widget,
|
|||||||
} else
|
} else
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
|
||||||
gdk_display_pointer_ungrab (gdk_drawable_get_display (event->window),
|
gdk_display_pointer_ungrab (gdk_window_get_display (event->window),
|
||||||
event->time);
|
event->time);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -777,7 +777,7 @@ is_hex_keyval (guint keyval)
|
|||||||
static guint
|
static guint
|
||||||
canonical_hex_keyval (GdkEventKey *event)
|
canonical_hex_keyval (GdkEventKey *event)
|
||||||
{
|
{
|
||||||
GdkKeymap *keymap = gdk_keymap_get_for_display (gdk_drawable_get_display (event->window));
|
GdkKeymap *keymap = gdk_keymap_get_for_display (gdk_window_get_display (event->window));
|
||||||
guint keyval;
|
guint keyval;
|
||||||
guint *keyvals = NULL;
|
guint *keyvals = NULL;
|
||||||
gint n_vals = 0;
|
gint n_vals = 0;
|
||||||
|
@ -1521,7 +1521,7 @@ rewrite_event_for_grabs (GdkEvent *event)
|
|||||||
case GDK_PROXIMITY_OUT:
|
case GDK_PROXIMITY_OUT:
|
||||||
case GDK_KEY_PRESS:
|
case GDK_KEY_PRESS:
|
||||||
case GDK_KEY_RELEASE:
|
case GDK_KEY_RELEASE:
|
||||||
display = gdk_drawable_get_display (event->any.window);
|
display = gdk_window_get_display (event->any.window);
|
||||||
device = gdk_event_get_device (event);
|
device = gdk_event_get_device (event);
|
||||||
|
|
||||||
if (!gdk_device_grab_info_libgtk_only (display, device, &grab_window, &owner_events) ||
|
if (!gdk_device_grab_info_libgtk_only (display, device, &grab_window, &owner_events) ||
|
||||||
|
@ -136,7 +136,7 @@ static void
|
|||||||
xembed_set_info (GdkWindow *window,
|
xembed_set_info (GdkWindow *window,
|
||||||
unsigned long flags)
|
unsigned long flags)
|
||||||
{
|
{
|
||||||
GdkDisplay *display = gdk_drawable_get_display (window);
|
GdkDisplay *display = gdk_window_get_display (window);
|
||||||
unsigned long buffer[2];
|
unsigned long buffer[2];
|
||||||
|
|
||||||
Atom xembed_info_atom = gdk_x11_get_xatom_by_name_for_display (display, "_XEMBED_INFO");
|
Atom xembed_info_atom = gdk_x11_get_xatom_by_name_for_display (display, "_XEMBED_INFO");
|
||||||
|
@ -2516,7 +2516,7 @@ _gtk_selection_incr_event (GdkWindow *window,
|
|||||||
g_message ("PropertyDelete, property %ld", event->atom);
|
g_message ("PropertyDelete, property %ld", event->atom);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
selection_max_size = GTK_SELECTION_MAX_SIZE (gdk_drawable_get_display (window));
|
selection_max_size = GTK_SELECTION_MAX_SIZE (gdk_window_get_display (window));
|
||||||
|
|
||||||
/* Now find the appropriate ongoing INCR */
|
/* Now find the appropriate ongoing INCR */
|
||||||
tmp_list = current_incrs;
|
tmp_list = current_incrs;
|
||||||
|
@ -295,7 +295,7 @@ xembed_get_info (GdkWindow *window,
|
|||||||
unsigned long *version,
|
unsigned long *version,
|
||||||
unsigned long *flags)
|
unsigned long *flags)
|
||||||
{
|
{
|
||||||
GdkDisplay *display = gdk_drawable_get_display (window);
|
GdkDisplay *display = gdk_window_get_display (window);
|
||||||
Atom xembed_info_atom = gdk_x11_get_xatom_by_name_for_display (display, "_XEMBED_INFO");
|
Atom xembed_info_atom = gdk_x11_get_xatom_by_name_for_display (display, "_XEMBED_INFO");
|
||||||
Atom type;
|
Atom type;
|
||||||
int format;
|
int format;
|
||||||
|
@ -4214,7 +4214,7 @@ set_invisible_cursor (GdkWindow *window)
|
|||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkCursor *cursor;
|
GdkCursor *cursor;
|
||||||
|
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_window_get_display (window);
|
||||||
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
|
cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
|
||||||
|
|
||||||
gdk_window_set_cursor (window, cursor);
|
gdk_window_set_cursor (window, cursor);
|
||||||
@ -8439,7 +8439,7 @@ text_window_realize (GtkTextWindow *win,
|
|||||||
if (gtk_widget_is_sensitive (widget))
|
if (gtk_widget_is_sensitive (widget))
|
||||||
{
|
{
|
||||||
/* I-beam cursor */
|
/* I-beam cursor */
|
||||||
cursor = gdk_cursor_new_for_display (gdk_drawable_get_display (window),
|
cursor = gdk_cursor_new_for_display (gdk_window_get_display (window),
|
||||||
GDK_XTERM);
|
GDK_XTERM);
|
||||||
gdk_window_set_cursor (win->bin_window, cursor);
|
gdk_window_set_cursor (win->bin_window, cursor);
|
||||||
gdk_cursor_unref (cursor);
|
gdk_cursor_unref (cursor);
|
||||||
|
@ -1208,7 +1208,7 @@ gtk_tool_item_group_realize (GtkWidget *widget)
|
|||||||
&attributes, attributes_mask);
|
&attributes, attributes_mask);
|
||||||
gtk_widget_set_window (widget, window);
|
gtk_widget_set_window (widget, window);
|
||||||
|
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_window_get_display (window);
|
||||||
|
|
||||||
if (gdk_display_supports_composite (display))
|
if (gdk_display_supports_composite (display))
|
||||||
gdk_window_set_composited (window, TRUE);
|
gdk_window_set_composited (window, TRUE);
|
||||||
|
@ -627,7 +627,7 @@ gtk_tool_palette_expose_event (GtkWidget *widget,
|
|||||||
|
|
||||||
window = gtk_widget_get_window (widget);
|
window = gtk_widget_get_window (widget);
|
||||||
|
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_window_get_display (window);
|
||||||
|
|
||||||
if (!gdk_display_supports_composite (display))
|
if (!gdk_display_supports_composite (display))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1437,7 +1437,7 @@ _gtk_tooltip_handle_event (GdkEvent *event)
|
|||||||
|
|
||||||
/* Returns coordinates relative to has_tooltip_widget's allocation. */
|
/* Returns coordinates relative to has_tooltip_widget's allocation. */
|
||||||
has_tooltip_widget = find_topmost_widget_coords_from_event (event, &x, &y);
|
has_tooltip_widget = find_topmost_widget_coords_from_event (event, &x, &y);
|
||||||
display = gdk_drawable_get_display (event->any.window);
|
display = gdk_window_get_display (event->any.window);
|
||||||
current_tooltip = g_object_get_data (G_OBJECT (display),
|
current_tooltip = g_object_get_data (G_OBJECT (display),
|
||||||
"gdk-display-current-tooltip");
|
"gdk-display-current-tooltip");
|
||||||
|
|
||||||
|
@ -3036,7 +3036,7 @@ gtk_tree_view_button_release_column_resize (GtkWidget *widget,
|
|||||||
|
|
||||||
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_IN_COLUMN_RESIZE);
|
GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_IN_COLUMN_RESIZE);
|
||||||
gtk_grab_remove (widget);
|
gtk_grab_remove (widget);
|
||||||
gdk_display_pointer_ungrab (gdk_drawable_get_display (event->window),
|
gdk_display_pointer_ungrab (gdk_window_get_display (event->window),
|
||||||
event->time);
|
event->time);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1298,7 +1298,7 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
|
|||||||
GDK_POINTER_MOTION_HINT_MASK |
|
GDK_POINTER_MOTION_HINT_MASK |
|
||||||
GDK_KEY_PRESS_MASK);
|
GDK_KEY_PRESS_MASK);
|
||||||
attributes_mask = GDK_WA_CURSOR | GDK_WA_X | GDK_WA_Y;
|
attributes_mask = GDK_WA_CURSOR | GDK_WA_X | GDK_WA_Y;
|
||||||
attr.cursor = gdk_cursor_new_for_display (gdk_drawable_get_display (tree_view->priv->header_window),
|
attr.cursor = gdk_cursor_new_for_display (gdk_window_get_display (tree_view->priv->header_window),
|
||||||
GDK_SB_H_DOUBLE_ARROW);
|
GDK_SB_H_DOUBLE_ARROW);
|
||||||
attr.y = 0;
|
attr.y = 0;
|
||||||
attr.width = TREE_VIEW_DRAG_WIDTH;
|
attr.width = TREE_VIEW_DRAG_WIDTH;
|
||||||
|
@ -147,7 +147,7 @@ _gtk_xembed_send_message (GdkWindow *recipient,
|
|||||||
|
|
||||||
g_return_if_fail (GDK_IS_WINDOW (recipient));
|
g_return_if_fail (GDK_IS_WINDOW (recipient));
|
||||||
|
|
||||||
display = gdk_drawable_get_display (recipient);
|
display = gdk_window_get_display (recipient);
|
||||||
GTK_NOTE (PLUGSOCKET,
|
GTK_NOTE (PLUGSOCKET,
|
||||||
g_message ("Sending %s", _gtk_xembed_message_name (message)));
|
g_message ("Sending %s", _gtk_xembed_message_name (message)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user