Use properly typed and named variables for user_data

This commit is contained in:
Hysterical Raisins
2019-07-09 13:46:44 +02:00
parent 05c3061f08
commit e04276ee38

View File

@ -65,10 +65,10 @@ static void set_dock (GtkWidget *widget,
GtkAllocation *allocation); GtkAllocation *allocation);
static void static void
on_monitors_changed (GdkScreen *screen, on_monitors_changed (GdkScreen *screen,
gpointer user_data) ServerContextService *context)
{ {
ServerContextService *context = user_data;
if (context->window) if (context->window)
set_geometry (context); set_geometry (context);
} }
@ -87,11 +87,10 @@ on_destroy (GtkWidget *widget, gpointer user_data)
} }
static void static void
on_notify_keyboard (GObject *object, on_notify_keyboard (GObject *object,
GParamSpec *spec, GParamSpec *spec,
gpointer user_data) ServerContextService *context)
{ {
ServerContextService *context = user_data;
const EekKeyboard *keyboard; const EekKeyboard *keyboard;
keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context)); keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context));
@ -124,21 +123,21 @@ on_notify_keyboard (GObject *object,
} }
} }
} }
static void static void
on_notify_fullscreen (GObject *object, on_notify_fullscreen (GObject *object, // <--- context
GParamSpec *spec, GParamSpec *spec,
gpointer user_data) ServerContextService *context) // <--- more context
{ {
ServerContextService *context = user_data;
if (context->window) if (context->window)
set_geometry (context); set_geometry (context);
} }
static void static void
on_notify_visible (GObject *object, GParamSpec *spec, gpointer user_data) on_notify_visible (GObject *object, // <--- context
GParamSpec *spec,
ServerContextService *context) // <--- more context
{ {
ServerContextService *context = user_data;
gboolean visible; gboolean visible;
g_object_get (object, "visible", &visible, NULL); g_object_get (object, "visible", &visible, NULL);
@ -197,10 +196,9 @@ on_size_allocate_set_dock (GtkWidget *widget,
} }
static void static void
on_realize_set_non_maximizable (GtkWidget *widget, on_realize_set_non_maximizable (GtkWidget *widget,
gpointer user_data) ServerContextService *context)
{ {
ServerContextService *context = user_data;
g_assert (context && context->window == widget); g_assert (context && context->window == widget);