# @show-menubar: Display the main window menubar. Defaults to "on".
# (Since 8.0)
#
+# @keep-aspect-ratio: Keep width/height aspect ratio of guest content when
+# resizing host window. Defaults to "on". (Since 10.1)
+#
# Since: 2.12
##
{ 'struct' : 'DisplayGTK',
- 'data' : { '*grab-on-hover' : 'bool',
- '*zoom-to-fit' : 'bool',
- '*show-tabs' : 'bool',
- '*show-menubar' : 'bool' } }
+ 'data' : { '*grab-on-hover' : 'bool',
+ '*zoom-to-fit' : 'bool',
+ '*show-tabs' : 'bool',
+ '*show-menubar' : 'bool',
+ '*keep-aspect-ratio' : 'bool' } }
##
# @DisplayEGLHeadless:
sx = (double)ww / fbw;
sy = (double)wh / fbh;
-
- vc->gfx.scale_x = vc->gfx.scale_y = MIN(sx, sy);
+ if (vc->s->keep_aspect_ratio) {
+ vc->gfx.scale_x = vc->gfx.scale_y = MIN(sx, sy);
+ } else {
+ vc->gfx.scale_x = sx;
+ vc->gfx.scale_y = sy;
+ }
}
}
/**
s->free_scale = true;
}
+ s->keep_aspect_ratio = true;
+ if (s->opts->u.gtk.has_keep_aspect_ratio)
+ s->keep_aspect_ratio = s->opts->u.gtk.keep_aspect_ratio;
+
for (i = 0; i < INPUT_EVENT_SLOTS_MAX; i++) {
struct touch_slot *slot = &touch_slots[i];
slot->tracking_id = -1;