[sysprof/wip/gtk4-port] egg-resizer: ignore unset drag positions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/gtk4-port] egg-resizer: ignore unset drag positions
- Date: Fri, 1 Apr 2022 23:40:58 +0000 (UTC)
commit fa886030243c94d654c98b6f9c328167c58ab09b
Author: Christian Hergert <chergert redhat com>
Date: Fri Apr 1 16:39:02 2022 -0700
egg-resizer: ignore unset drag positions
src/libsysprof-ui/egg-resizer.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/libsysprof-ui/egg-resizer.c b/src/libsysprof-ui/egg-resizer.c
index 1292f7ed..c2b427bc 100644
--- a/src/libsysprof-ui/egg-resizer.c
+++ b/src/libsysprof-ui/egg-resizer.c
@@ -195,10 +195,13 @@ egg_resizer_measure (GtkWidget *widget,
{
int handle_min, handle_nat;
- if (self->drag_position > *minimum)
- *natural = self->drag_position;
- else if (self->drag_position < *minimum)
- *natural = *minimum;
+ if (self->drag_position != 0)
+ {
+ if (self->drag_position > *minimum)
+ *natural = self->drag_position;
+ else if (self->drag_position < *minimum)
+ *natural = *minimum;
+ }
if (gtk_widget_get_visible (GTK_WIDGET (self->handle)))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]