Commit d6d429af authored by Sean Davis's avatar Sean Davis
Browse files

Ignore GdkScreen deprecations until upstream finds a solution

parent f9d204fe
......@@ -171,6 +171,7 @@ compute_xsettings_dpi (GtkWidget *widget)
int width, height;
int dpi;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
screen = gtk_widget_get_screen (widget);
width_mm = gdk_screen_get_width_mm (screen);
height_mm = gdk_screen_get_height_mm (screen);
......@@ -183,6 +184,7 @@ compute_xsettings_dpi (GtkWidget *widget)
dpi = MIN (INCH_MM * width / width_mm,
INCH_MM * height / height_mm);
}
G_GNUC_END_IGNORE_DEPRECATIONS
return dpi;
}
......@@ -1245,7 +1247,7 @@ appearance_settings_dialog_configure_widgets (GtkBuilder *builder)
gtk_widget_set_sensitive (GTK_WIDGET (object2), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (object)));
g_signal_connect (G_OBJECT (object), "toggled", G_CALLBACK (cb_custom_dpi_check_button_toggled), object2);
g_signal_connect (G_OBJECT (object2), "value-changed", G_CALLBACK (cb_custom_dpi_spin_button_changed), object);
/* Window scaling factor */
object = gtk_builder_get_object (builder, "gdk_window_scaling_factor_combo_box");
appearance_settings_dialog_channel_property_changed (xsettings_channel, "/Gdk/WindowScalingFactor", NULL, builder);
......
......@@ -820,8 +820,10 @@ display_setting_identity_display (gint display_id)
{
screen_pos_x = 0;
screen_pos_y = 0;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
G_GNUC_END_IGNORE_DEPRECATIONS
}
name_label = g_markup_printf_escaped ("<span foreground='%s'><big><b>%s %s</b></big></span>",
......
......@@ -249,7 +249,7 @@ xfce_randr_populate (XfceRandr *randr,
/* Update display info, primary display may have changed. */
xfce_randr_save_output (randr, "Default", display_channel, m);
/* Replace spaces with underscore in name for xfconf compatibility */
g_strcanon(randr->priv->output_info[m]->name, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_<>", '_');
}
......@@ -626,6 +626,7 @@ xfce_randr_preferred_mode (XfceRandr *randr,
best_dist = 0;
for (n = 0; n < randr->priv->output_info[output]->nmode; ++n)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (n < randr->priv->output_info[output]->npreferred)
dist = 0;
else if (randr->priv->output_info[output]->mm_height != 0)
......@@ -634,6 +635,7 @@ xfce_randr_preferred_mode (XfceRandr *randr,
randr->priv->output_info[output]->mm_height);
else
dist = gdk_screen_height () - randr->priv->modes[output][n].height;
G_GNUC_END_IGNORE_DEPRECATIONS
dist = ABS (dist);
......
......@@ -558,6 +558,7 @@ xfce_displays_helper_set_screen_size (XfceDisplaysHelper *helper)
return;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "min_h = %d, min_w = %d, max_h = %d, max_w = %d, "
"prev_h = %d, prev_w = %d, prev_hmm = %d, prev_wmm = %d, h = %d, w = %d, "
"hmm = %d, wmm = %d.", min_height, min_width, max_height, max_width,
......@@ -578,6 +579,7 @@ xfce_displays_helper_set_screen_size (XfceDisplaysHelper *helper)
XRRSetScreenSize (helper->xdisplay, GDK_WINDOW_XID (helper->root_window),
helper->width, helper->height, helper->mm_width, helper->mm_height);
}
G_GNUC_END_IGNORE_DEPRECATIONS
}
......@@ -857,6 +859,7 @@ xfce_displays_helper_list_outputs (XfceDisplaysHelper *helper)
if (helper->resources->modes[m].id != output->info->modes[l])
continue;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (l < output->info->npreferred)
dist = 0;
else if (output->info->mm_height != 0)
......@@ -864,6 +867,7 @@ xfce_displays_helper_list_outputs (XfceDisplaysHelper *helper)
1000 * helper->resources->modes[m].height / output->info->mm_height);
else
dist = gdk_screen_height () - helper->resources->modes[m].height;
G_GNUC_END_IGNORE_DEPRECATIONS
dist = ABS (dist);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment