mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual
This commit is contained in:
parent
5b9bbf9de2
commit
9f47be2216
@ -1685,7 +1685,7 @@ gtk_drag_set_icon_name (GdkDragContext *context,
|
||||
g_return_if_fail (context->is_source);
|
||||
g_return_if_fail (icon_name != NULL);
|
||||
|
||||
screen = gdk_drawable_get_screen (context->source_window);
|
||||
screen = gdk_window_get_screen (context->source_window);
|
||||
g_return_if_fail (screen != NULL);
|
||||
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
|
12
gtk/gtkdnd.c
12
gtk/gtkdnd.c
@ -1076,7 +1076,7 @@ gtk_drag_finish (GdkDragContext *context,
|
||||
|
||||
if (target != GDK_NONE)
|
||||
{
|
||||
GtkWidget *selection_widget = gtk_drag_get_ipc_widget_for_screen (gdk_drawable_get_screen (context->source_window));
|
||||
GtkWidget *selection_widget = gtk_drag_get_ipc_widget_for_screen (gdk_window_get_screen (context->source_window));
|
||||
|
||||
g_object_ref (context);
|
||||
|
||||
@ -2143,7 +2143,7 @@ gtk_drag_dest_motion (GtkWidget *widget,
|
||||
{
|
||||
gdk_drag_find_window_for_screen (info->proxy_source->context,
|
||||
NULL,
|
||||
gdk_drawable_get_screen (current_event->dnd.window),
|
||||
gdk_window_get_screen (current_event->dnd.window),
|
||||
current_event->dnd.x_root,
|
||||
current_event->dnd.y_root,
|
||||
&dest_window, &proto);
|
||||
@ -2265,7 +2265,7 @@ gtk_drag_dest_drop (GtkWidget *widget,
|
||||
{
|
||||
gdk_drag_find_window_for_screen (info->proxy_source->context,
|
||||
NULL,
|
||||
gdk_drawable_get_screen (current_event->dnd.window),
|
||||
gdk_window_get_screen (current_event->dnd.window),
|
||||
current_event->dnd.x_root,
|
||||
current_event->dnd.y_root,
|
||||
&dest_window, &proto);
|
||||
@ -3127,7 +3127,7 @@ set_icon_stock_pixbuf (GdkDragContext *context,
|
||||
g_return_if_fail (pixbuf != NULL || stock_id != NULL);
|
||||
g_return_if_fail (pixbuf == NULL || stock_id == NULL);
|
||||
|
||||
screen = gdk_drawable_get_screen (context->source_window);
|
||||
screen = gdk_window_get_screen (context->source_window);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND);
|
||||
@ -3295,7 +3295,7 @@ gtk_drag_set_icon_surface (GdkDragContext *context,
|
||||
_gtk_cairo_surface_extents (surface, &extents);
|
||||
|
||||
|
||||
screen = gdk_drawable_get_screen (context->source_window);
|
||||
screen = gdk_window_get_screen (context->source_window);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND);
|
||||
@ -3385,7 +3385,7 @@ gtk_drag_set_icon_name (GdkDragContext *context,
|
||||
g_return_if_fail (context->is_source);
|
||||
g_return_if_fail (icon_name != NULL);
|
||||
|
||||
screen = gdk_drawable_get_screen (context->source_window);
|
||||
screen = gdk_window_get_screen (context->source_window);
|
||||
g_return_if_fail (screen != NULL);
|
||||
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
|
@ -701,7 +701,7 @@ beep_window (GdkWindow *window)
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkScreen *screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
|
||||
GdkScreen *screen = gdk_window_get_screen (GDK_DRAWABLE (window));
|
||||
gboolean beep;
|
||||
|
||||
g_object_get (gtk_settings_get_for_screen (screen),
|
||||
|
@ -683,7 +683,7 @@ _gtk_im_module_get_default_context_id (GdkWindow *client_window)
|
||||
*/
|
||||
if (GDK_IS_DRAWABLE (client_window))
|
||||
{
|
||||
screen = gdk_drawable_get_screen (GDK_DRAWABLE (client_window));
|
||||
screen = gdk_window_get_screen (GDK_DRAWABLE (client_window));
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
g_object_get (G_OBJECT (settings), "gtk-im-module", &tmp, NULL);
|
||||
if (tmp)
|
||||
|
@ -297,7 +297,7 @@ gtk_im_multicontext_set_client_window (GtkIMContext *context,
|
||||
|
||||
if (window)
|
||||
{
|
||||
screen = gdk_drawable_get_screen (GDK_DRAWABLE (window));
|
||||
screen = gdk_window_get_screen (GDK_DRAWABLE (window));
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
|
||||
connected = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (settings),
|
||||
|
@ -169,7 +169,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
|
||||
{
|
||||
HWND parent = GetAncestor (msg->hwnd, GA_PARENT);
|
||||
gboolean was_embedded = priv->socket_window != NULL;
|
||||
GdkScreen *screen = gdk_drawable_get_screen (event->any.window);
|
||||
GdkScreen *screen = gdk_window_get_screen (event->any.window);
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
|
||||
GTK_NOTE (PLUGSOCKET, g_printerr ("WM_WINDOWPOSCHANGED: hwnd=%p GA_PARENT=%p socket_window=%p\n", msg->hwnd, parent, priv->socket_window));
|
||||
|
@ -223,7 +223,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
GdkScreen *screen = gdk_drawable_get_screen (event->any.window);
|
||||
GdkScreen *screen = gdk_window_get_screen (event->any.window);
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GtkPlug *plug = GTK_PLUG (data);
|
||||
GtkPlugPrivate *priv = plug->priv;
|
||||
|
@ -1974,7 +1974,7 @@ _gtk_settings_handle_event (GdkEventSetting *event)
|
||||
GParamSpec *pspec;
|
||||
guint property_id;
|
||||
|
||||
settings = gtk_settings_get_for_screen (gdk_drawable_get_screen (event->window));
|
||||
settings = gtk_settings_get_for_screen (gdk_window_get_screen (event->window));
|
||||
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), event->name);
|
||||
|
||||
if (pspec)
|
||||
|
@ -129,7 +129,7 @@ _gtk_socket_windowing_send_key_event (GtkSocket *socket,
|
||||
gboolean mask_key_presses)
|
||||
{
|
||||
XKeyEvent xkey;
|
||||
GdkScreen *screen = gdk_drawable_get_screen (socket->plug_window);
|
||||
GdkScreen *screen = gdk_window_get_screen (socket->plug_window);
|
||||
|
||||
memset (&xkey, 0, sizeof (xkey));
|
||||
xkey.type = (gdk_event->type == GDK_KEY_PRESS) ? KeyPress : KeyRelease;
|
||||
|
@ -678,7 +678,7 @@ gtk_style_attach (GtkStyle *style,
|
||||
g_return_val_if_fail (GTK_IS_STYLE (style), NULL);
|
||||
g_return_val_if_fail (window != NULL, NULL);
|
||||
|
||||
visual = gdk_drawable_get_visual (window);
|
||||
visual = gdk_window_get_visual (window);
|
||||
|
||||
if (!style->styles)
|
||||
style->styles = g_slist_append (NULL, style);
|
||||
|
@ -1412,7 +1412,7 @@ tooltips_enabled (GdkWindow *window)
|
||||
GdkScreen *screen;
|
||||
GtkSettings *settings;
|
||||
|
||||
screen = gdk_drawable_get_screen (window);
|
||||
screen = gdk_window_get_screen (window);
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
|
||||
g_object_get (settings,
|
||||
|
@ -14257,7 +14257,7 @@ gtk_tree_view_search_position_func (GtkTreeView *tree_view,
|
||||
gint tree_x, tree_y;
|
||||
gint tree_width, tree_height;
|
||||
GdkWindow *tree_window = gtk_widget_get_window (GTK_WIDGET (tree_view));
|
||||
GdkScreen *screen = gdk_drawable_get_screen (tree_window);
|
||||
GdkScreen *screen = gdk_window_get_screen (tree_window);
|
||||
GtkRequisition requisition;
|
||||
gint monitor_num;
|
||||
GdkRectangle monitor;
|
||||
|
@ -8675,7 +8675,7 @@ gtk_widget_get_visual (GtkWidget *widget)
|
||||
{
|
||||
if (gtk_widget_get_has_window (w) &&
|
||||
w->priv->window)
|
||||
return gdk_drawable_get_visual (w->priv->window);
|
||||
return gdk_window_get_visual (w->priv->window);
|
||||
|
||||
if (GTK_IS_WINDOW (w))
|
||||
return _gtk_window_get_visual (GTK_WINDOW (w));
|
||||
@ -9350,7 +9350,7 @@ _gtk_widget_set_device_window (GtkWidget *widget,
|
||||
if (!gtk_widget_get_realized (widget))
|
||||
return;
|
||||
|
||||
screen = gdk_drawable_get_screen (priv->window);
|
||||
screen = gdk_window_get_screen (priv->window);
|
||||
device_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
|
||||
|
||||
if (G_UNLIKELY (!device_window))
|
||||
@ -9394,7 +9394,7 @@ _gtk_widget_get_device_window (GtkWidget *widget,
|
||||
if (!gtk_widget_get_realized (widget))
|
||||
return NULL;
|
||||
|
||||
screen = gdk_drawable_get_screen (priv->window);
|
||||
screen = gdk_window_get_screen (priv->window);
|
||||
device_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
|
||||
|
||||
if (G_UNLIKELY (!device_window))
|
||||
@ -9438,7 +9438,7 @@ _gtk_widget_list_devices (GtkWidget *widget)
|
||||
if (!gtk_widget_get_realized (widget))
|
||||
return NULL;
|
||||
|
||||
screen = gdk_drawable_get_screen (priv->window);
|
||||
screen = gdk_window_get_screen (priv->window);
|
||||
device_window = g_object_get_qdata (G_OBJECT (screen), quark_pointer_window);
|
||||
|
||||
if (G_UNLIKELY (!device_window))
|
||||
|
@ -495,7 +495,7 @@ get_im (GdkWindow *client_window,
|
||||
{
|
||||
GSList *tmp_list;
|
||||
GtkXIMInfo *info;
|
||||
GdkScreen *screen = gdk_drawable_get_screen (client_window);
|
||||
GdkScreen *screen = gdk_window_get_screen (client_window);
|
||||
|
||||
info = NULL;
|
||||
tmp_list = open_ims;
|
||||
@ -716,7 +716,7 @@ gtk_im_context_xim_filter_keypress (GtkIMContext *context,
|
||||
KeySym keysym;
|
||||
Status status;
|
||||
gboolean result = FALSE;
|
||||
GdkWindow *root_window = gdk_screen_get_root_window (gdk_drawable_get_screen (event->window));
|
||||
GdkWindow *root_window = gdk_screen_get_root_window (gdk_window_get_screen (event->window));
|
||||
|
||||
XKeyPressedEvent xevent;
|
||||
|
||||
|
@ -828,7 +828,7 @@ filter_func (GdkXEvent *gdkxevent,
|
||||
if (window)
|
||||
{
|
||||
screen_n = gdk_screen_get_number (
|
||||
gdk_drawable_get_screen (GDK_DRAWABLE (window)));
|
||||
gdk_window_get_screen (GDK_DRAWABLE (window)));
|
||||
|
||||
gail_screens [screen_n].update_stacked_windows = TRUE;
|
||||
if (!gail_screens [screen_n].update_handler)
|
||||
@ -966,7 +966,7 @@ get_window_zorder (GdkWindow *window)
|
||||
gail_return_val_if_fail (GDK_IS_WINDOW (window), -1);
|
||||
|
||||
info = get_screen_info (
|
||||
gdk_drawable_get_screen (GDK_DRAWABLE (window)));
|
||||
gdk_window_get_screen (GDK_DRAWABLE (window)));
|
||||
|
||||
gail_return_val_if_fail (info->stacked_windows != NULL, -1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user