Commit cd0ab72a authored by Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto
Browse files

view: Set overflow to HIDDEN

Layers can, on various circumstances, try and draw outside their
boundaries. We should not allow that.

Set the overflow to HIDDEN on ShumateView itself. Remove the HIDDEN
overflow from ShumateMapLayer too, since OpenGL clipping isn't super
cheap, and ShumateView already takes care of it.
parent e7d265e9
......@@ -444,9 +444,6 @@ shumate_map_layer_class_init (ShumateMapLayerClass *klass)
static void
shumate_map_layer_init (ShumateMapLayer *self)
{
g_object_set (G_OBJECT (self),
"overflow", GTK_OVERFLOW_HIDDEN,
NULL);
self->tiles_positions = g_ptr_array_new_with_free_func ((GDestroyNotify) tile_grid_position_free);
self->tile_fill = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, g_object_unref);
}
......
......@@ -733,6 +733,8 @@ shumate_view_init (ShumateView *view)
motion_controller = gtk_event_controller_motion_new ();
g_signal_connect_swapped (motion_controller, "motion", G_CALLBACK (on_motion_controller_motion), view);
gtk_widget_add_controller (GTK_WIDGET (view), motion_controller);
gtk_widget_set_overflow (GTK_WIDGET (view), GTK_OVERFLOW_HIDDEN);
}
/**
......
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