Use properly typed and named variables for user_data
This commit is contained in:
		@ -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));
 | 
				
			||||||
@ -126,19 +125,19 @@ 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);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user