gdk: pull more precondition checks into the generic gdkscreen.c

This commit is contained in:
Michael Natterer
2012-02-24 16:44:44 +01:00
parent 4a6658b0fa
commit 8c1c4dfd7c
4 changed files with 5 additions and 24 deletions

View File

@ -220,8 +220,6 @@ gdk_wayland_screen_get_monitor_width_mm (GdkScreen *screen,
{
GdkScreenWayland *screen_wayland = GDK_SCREEN_WAYLAND (screen);
g_return_val_if_fail (monitor_num < screen_wayland->n_monitors, -1);
return screen_wayland->monitors[monitor_num].width_mm;
}
@ -231,8 +229,6 @@ gdk_wayland_screen_get_monitor_height_mm (GdkScreen *screen,
{
GdkScreenWayland *screen_wayland = GDK_SCREEN_WAYLAND (screen);
g_return_val_if_fail (monitor_num < screen_wayland->n_monitors, -1);
return screen_wayland->monitors[monitor_num].height_mm;
}
@ -242,8 +238,6 @@ gdk_wayland_screen_get_monitor_plug_name (GdkScreen *screen,
{
GdkScreenWayland *screen_wayland = GDK_SCREEN_WAYLAND (screen);
g_return_val_if_fail (monitor_num < screen_wayland->n_monitors, NULL);
return g_strdup (screen_wayland->monitors[monitor_num].output_name);
}
@ -254,8 +248,6 @@ gdk_wayland_screen_get_monitor_geometry (GdkScreen *screen,
{
GdkScreenWayland *screen_wayland = GDK_SCREEN_WAYLAND (screen);
g_return_if_fail (monitor_num < screen_wayland->n_monitors);
if (dest)
*dest = screen_wayland->monitors[monitor_num].geometry;
}