Avoid deprecation warnings
The recent round of deprecation additions has caused some warnings that we should avoid.
This commit is contained in:
parent
4add92a431
commit
a61d7f7acf
@ -4277,8 +4277,10 @@ gdk_x11_window_fullscreen_on_monitor (GdkWindow *window,
|
|||||||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
|
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gdk_screen_get_monitor_geometry (GDK_WINDOW_SCREEN (window), monitor, &monitor_geom);
|
gdk_screen_get_monitor_geometry (GDK_WINDOW_SCREEN (window), monitor, &monitor_geom);
|
||||||
gdk_window_move (window, monitor_geom.x, monitor_geom.y);
|
gdk_window_move (window, monitor_geom.x, monitor_geom.y);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
gdk_window_set_fullscreen_mode (window, GDK_FULLSCREEN_ON_CURRENT_MONITOR);
|
gdk_window_set_fullscreen_mode (window, GDK_FULLSCREEN_ON_CURRENT_MONITOR);
|
||||||
gdk_x11_window_fullscreen (window);
|
gdk_x11_window_fullscreen (window);
|
||||||
|
@ -224,9 +224,11 @@ gtk_tray_icon_constructed (GObject *object)
|
|||||||
Display *xdisplay = gdk_x11_display_get_xdisplay (display);
|
Display *xdisplay = gdk_x11_display_get_xdisplay (display);
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
g_snprintf (buffer, sizeof (buffer),
|
g_snprintf (buffer, sizeof (buffer),
|
||||||
"_NET_SYSTEM_TRAY_S%d",
|
"_NET_SYSTEM_TRAY_S%d",
|
||||||
gdk_screen_get_number (screen));
|
gdk_screen_get_number (screen));
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
icon->priv->selection_atom = XInternAtom (xdisplay, buffer, False);
|
icon->priv->selection_atom = XInternAtom (xdisplay, buffer, False);
|
||||||
|
|
||||||
@ -950,6 +952,7 @@ gtk_tray_icon_realize (GtkWidget *widget)
|
|||||||
|
|
||||||
GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->realize (widget);
|
GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->realize (widget);
|
||||||
window = gtk_widget_get_window (widget);
|
window = gtk_widget_get_window (widget);
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
if (icon->priv->manager_visual_rgba)
|
if (icon->priv->manager_visual_rgba)
|
||||||
{
|
{
|
||||||
/* Set a transparent background */
|
/* Set a transparent background */
|
||||||
@ -961,6 +964,7 @@ gtk_tray_icon_realize (GtkWidget *widget)
|
|||||||
/* Set a parent-relative background pixmap */
|
/* Set a parent-relative background pixmap */
|
||||||
gdk_window_set_background_pattern (window, NULL);
|
gdk_window_set_background_pattern (window, NULL);
|
||||||
}
|
}
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
GTK_NOTE (PLUGSOCKET,
|
GTK_NOTE (PLUGSOCKET,
|
||||||
g_message ("GtkStatusIcon %p: realized, window: %lx, socket window: %lx",
|
g_message ("GtkStatusIcon %p: realized, window: %lx, socket window: %lx",
|
||||||
|
@ -1750,8 +1750,10 @@ gtk_menu_tearoff_bg_copy (GtkMenu *menu)
|
|||||||
|
|
||||||
gtk_widget_set_size_request (priv->tearoff_window, width, height);
|
gtk_widget_set_size_request (priv->tearoff_window, width, height);
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
pattern = cairo_pattern_create_for_surface (surface);
|
pattern = cairo_pattern_create_for_surface (surface);
|
||||||
gdk_window_set_background_pattern (window, pattern);
|
gdk_window_set_background_pattern (window, pattern);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
cairo_pattern_destroy (pattern);
|
cairo_pattern_destroy (pattern);
|
||||||
cairo_surface_destroy (surface);
|
cairo_surface_destroy (surface);
|
||||||
@ -2131,6 +2133,7 @@ gtk_menu_popup (GtkMenu *menu,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_MENU (menu));
|
g_return_if_fail (GTK_IS_MENU (menu));
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gtk_menu_popup_for_device (menu,
|
gtk_menu_popup_for_device (menu,
|
||||||
NULL,
|
NULL,
|
||||||
parent_menu_shell,
|
parent_menu_shell,
|
||||||
@ -2138,6 +2141,7 @@ gtk_menu_popup (GtkMenu *menu,
|
|||||||
|
|
||||||
func, data, NULL,
|
func, data, NULL,
|
||||||
button, activate_time);
|
button, activate_time);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkDevice *
|
static GdkDevice *
|
||||||
|
@ -2960,7 +2960,9 @@ show_drag_window (GtkNotebook *notebook,
|
|||||||
&attributes,
|
&attributes,
|
||||||
attributes_mask);
|
attributes_mask);
|
||||||
gtk_widget_register_window (widget, priv->drag_window);
|
gtk_widget_register_window (widget, priv->drag_window);
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gdk_window_set_background_rgba (priv->drag_window, &transparent);
|
gdk_window_set_background_rgba (priv->drag_window, &transparent);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_set_child_visible (page->tab_label, FALSE);
|
gtk_widget_set_child_visible (page->tab_label, FALSE);
|
||||||
|
@ -4178,7 +4178,9 @@ create_indicator_window (GtkScrolledWindow *scrolled_window,
|
|||||||
&attributes, attributes_mask);
|
&attributes, attributes_mask);
|
||||||
gtk_widget_register_window (widget, window);
|
gtk_widget_register_window (widget, window);
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
gdk_window_set_background_rgba (window, &transparent);
|
gdk_window_set_background_rgba (window, &transparent);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
if (scrolled_window->priv->use_indicators)
|
if (scrolled_window->priv->use_indicators)
|
||||||
gtk_widget_set_parent_window (child, window);
|
gtk_widget_set_parent_window (child, window);
|
||||||
|
@ -1116,10 +1116,12 @@ gtk_socket_add_window (GtkSocket *socket,
|
|||||||
|
|
||||||
private->need_map = private->is_mapped;
|
private->need_map = private->is_mapped;
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
protocol = gdk_window_get_drag_protocol (private->plug_window, NULL);
|
protocol = gdk_window_get_drag_protocol (private->plug_window, NULL);
|
||||||
if (protocol)
|
if (protocol)
|
||||||
gtk_drag_dest_set_proxy (GTK_WIDGET (socket), private->plug_window,
|
gtk_drag_dest_set_proxy (GTK_WIDGET (socket), private->plug_window,
|
||||||
protocol, TRUE);
|
protocol, TRUE);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
gdk_error_trap_pop_ignored ();
|
gdk_error_trap_pop_ignored ();
|
||||||
|
|
||||||
@ -1526,11 +1528,13 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent,
|
|||||||
(xevent->xproperty.atom == gdk_x11_get_xatom_by_name_for_display (display, "_MOTIF_DRAG_RECEIVER_INFO")))
|
(xevent->xproperty.atom == gdk_x11_get_xatom_by_name_for_display (display, "_MOTIF_DRAG_RECEIVER_INFO")))
|
||||||
{
|
{
|
||||||
gdk_error_trap_push ();
|
gdk_error_trap_push ();
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
protocol = gdk_window_get_drag_protocol (private->plug_window, NULL);
|
protocol = gdk_window_get_drag_protocol (private->plug_window, NULL);
|
||||||
if (protocol)
|
if (protocol)
|
||||||
gtk_drag_dest_set_proxy (GTK_WIDGET (socket),
|
gtk_drag_dest_set_proxy (GTK_WIDGET (socket),
|
||||||
private->plug_window,
|
private->plug_window,
|
||||||
protocol, TRUE);
|
protocol, TRUE);
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
gdk_error_trap_pop_ignored ();
|
gdk_error_trap_pop_ignored ();
|
||||||
return_val = GDK_FILTER_REMOVE;
|
return_val = GDK_FILTER_REMOVE;
|
||||||
|
@ -2477,6 +2477,7 @@ gtk_style_context_set_background (GtkStyleContext *context,
|
|||||||
*
|
*
|
||||||
* We could indeed just set black instead of the color we have.
|
* We could indeed just set black instead of the color we have.
|
||||||
*/
|
*/
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
if (gtk_css_style_render_background_is_opaque (gtk_style_context_lookup_style (context)))
|
if (gtk_css_style_render_background_is_opaque (gtk_style_context_lookup_style (context)))
|
||||||
{
|
{
|
||||||
const GdkRGBA *color;
|
const GdkRGBA *color;
|
||||||
@ -2490,6 +2491,7 @@ gtk_style_context_set_background (GtkStyleContext *context,
|
|||||||
GdkRGBA transparent = { 0.0, 0.0, 0.0, 0.0 };
|
GdkRGBA transparent = { 0.0, 0.0, 0.0, 0.0 };
|
||||||
gdk_window_set_background_rgba (window, &transparent);
|
gdk_window_set_background_rgba (window, &transparent);
|
||||||
}
|
}
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user