Merge branch 'bilelmoussaoui/cleanup' into 'main'

display-picture: Don't compute min-width/min-height

See merge request chergert/libmks!10
This commit is contained in:
Christian Hergert 2023-04-20 20:45:46 +00:00
commit 2a7ec12df3
3 changed files with 3 additions and 10 deletions

View File

@ -456,7 +456,7 @@ mks_display_picture_measure (GtkWidget *widget,
{ {
MksDisplayPicture *self = (MksDisplayPicture *)widget; MksDisplayPicture *self = (MksDisplayPicture *)widget;
GdkPaintable *paintable; GdkPaintable *paintable;
double min_width, min_height, nat_width, nat_height; double nat_width, nat_height;
int default_width; int default_width;
int default_height; int default_height;
@ -480,11 +480,6 @@ mks_display_picture_measure (GtkWidget *widget,
if (default_height <= 0) if (default_height <= 0)
default_height = 480; default_height = 480;
gdk_paintable_compute_concrete_size (paintable,
0, 0,
default_width, default_height,
&min_width, &min_height);
if (orientation == GTK_ORIENTATION_HORIZONTAL) if (orientation == GTK_ORIENTATION_HORIZONTAL)
{ {
gdk_paintable_compute_concrete_size (paintable, gdk_paintable_compute_concrete_size (paintable,

View File

@ -185,8 +185,7 @@ mks_display_legacy_event_cb (MksDisplay *self,
if (priv->screen == NULL) if (priv->screen == NULL)
return GDK_EVENT_PROPAGATE; return GDK_EVENT_PROPAGATE;
if (FALSE) {} if (event_type == GDK_BUTTON_PRESS)
else if (event_type == GDK_BUTTON_PRESS)
{ {
if (priv->inhibitor == NULL) if (priv->inhibitor == NULL)
{ {

View File

@ -62,8 +62,7 @@ mks_keyboard_keyboard_notify_cb (MksKeyboard *self,
g_assert (pspec != NULL); g_assert (pspec != NULL);
g_assert (MKS_QEMU_IS_KEYBOARD (keyboard)); g_assert (MKS_QEMU_IS_KEYBOARD (keyboard));
if (FALSE) {} if (strcmp (pspec->name, "modifiers") == 0)
else if (strcmp (pspec->name, "modifiers") == 0)
{ {
self->modifiers = mks_qemu_keyboard_get_modifiers (keyboard); self->modifiers = mks_qemu_keyboard_get_modifiers (keyboard);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MODIFIERS]); g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MODIFIERS]);