Put back the Linux runner and .clangd formatting

Swept into the previous commit by a git add -A while a formatter had run over
them in the background. Unrelated to that commit's subject, and the C++ change
flipped pointer style away from what the Flutter template ships, so it would
come back on every regenerate and churn again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Suriya
2026-08-06 17:11:10 +05:30
parent 7b6cd598f0
commit cb065a0f69
2 changed files with 22 additions and 22 deletions

View File

@@ -20,8 +20,8 @@
# If you do want real analysis of this directory, do it on Linux with the GTK # If you do want real analysis of this directory, do it on Linux with the GTK
# headers present and a compile_commands.json — not by editing the runner. # headers present and a compile_commands.json — not by editing the runner.
If: If:
PathMatch: [.*linux/.*, linux/.*] PathMatch: linux/.*
Diagnostics: Diagnostics:
Suppress: ["*"] Suppress: '*'
UnusedIncludes: None UnusedIncludes: None

View File

@@ -9,20 +9,20 @@
struct _MyApplication { struct _MyApplication {
GtkApplication parent_instance; GtkApplication parent_instance;
char **dart_entrypoint_arguments; char** dart_entrypoint_arguments;
}; };
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
// Called when first Flutter frame received. // Called when first Flutter frame received.
static void first_frame_cb(MyApplication *self, FlView *view) { static void first_frame_cb(MyApplication* self, FlView* view) {
gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));
} }
// Implements GApplication::activate. // Implements GApplication::activate.
static void my_application_activate(GApplication *application) { static void my_application_activate(GApplication* application) {
MyApplication *self = MY_APPLICATION(application); MyApplication* self = MY_APPLICATION(application);
GtkWindow *window = GtkWindow* window =
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
// Use a header bar when running in GNOME as this is the common style used // Use a header bar when running in GNOME as this is the common style used
@@ -34,16 +34,16 @@ static void my_application_activate(GApplication *application) {
// if future cases occur). // if future cases occur).
gboolean use_header_bar = TRUE; gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
GdkScreen *screen = gtk_window_get_screen(window); GdkScreen* screen = gtk_window_get_screen(window);
if (GDK_IS_X11_SCREEN(screen)) { if (GDK_IS_X11_SCREEN(screen)) {
const gchar *wm_name = gdk_x11_screen_get_window_manager_name(screen); const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
if (g_strcmp0(wm_name, "GNOME Shell") != 0) { if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
use_header_bar = FALSE; use_header_bar = FALSE;
} }
} }
#endif #endif
if (use_header_bar) { if (use_header_bar) {
GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar)); gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "nearle_pos"); gtk_header_bar_set_title(header_bar, "nearle_pos");
gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_header_bar_set_show_close_button(header_bar, TRUE);
@@ -58,7 +58,7 @@ static void my_application_activate(GApplication *application) {
fl_dart_project_set_dart_entrypoint_arguments( fl_dart_project_set_dart_entrypoint_arguments(
project, self->dart_entrypoint_arguments); project, self->dart_entrypoint_arguments);
FlView *view = fl_view_new(project); FlView* view = fl_view_new(project);
GdkRGBA background_color; GdkRGBA background_color;
// Background defaults to black, override it here if necessary, e.g. #00000000 // Background defaults to black, override it here if necessary, e.g. #00000000
// for transparent. // for transparent.
@@ -79,10 +79,10 @@ static void my_application_activate(GApplication *application) {
} }
// Implements GApplication::local_command_line. // Implements GApplication::local_command_line.
static gboolean my_application_local_command_line(GApplication *application, static gboolean my_application_local_command_line(GApplication* application,
gchar ***arguments, gchar*** arguments,
int *exit_status) { int* exit_status) {
MyApplication *self = MY_APPLICATION(application); MyApplication* self = MY_APPLICATION(application);
// Strip out the first argument as it is the binary name. // Strip out the first argument as it is the binary name.
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
@@ -100,7 +100,7 @@ static gboolean my_application_local_command_line(GApplication *application,
} }
// Implements GApplication::startup. // Implements GApplication::startup.
static void my_application_startup(GApplication *application) { static void my_application_startup(GApplication* application) {
// MyApplication* self = MY_APPLICATION(object); // MyApplication* self = MY_APPLICATION(object);
// Perform any actions required at application startup. // Perform any actions required at application startup.
@@ -109,7 +109,7 @@ static void my_application_startup(GApplication *application) {
} }
// Implements GApplication::shutdown. // Implements GApplication::shutdown.
static void my_application_shutdown(GApplication *application) { static void my_application_shutdown(GApplication* application) {
// MyApplication* self = MY_APPLICATION(object); // MyApplication* self = MY_APPLICATION(object);
// Perform any actions required at application shutdown. // Perform any actions required at application shutdown.
@@ -118,13 +118,13 @@ static void my_application_shutdown(GApplication *application) {
} }
// Implements GObject::dispose. // Implements GObject::dispose.
static void my_application_dispose(GObject *object) { static void my_application_dispose(GObject* object) {
MyApplication *self = MY_APPLICATION(object); MyApplication* self = MY_APPLICATION(object);
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
G_OBJECT_CLASS(my_application_parent_class)->dispose(object); G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
} }
static void my_application_class_init(MyApplicationClass *klass) { static void my_application_class_init(MyApplicationClass* klass) {
G_APPLICATION_CLASS(klass)->activate = my_application_activate; G_APPLICATION_CLASS(klass)->activate = my_application_activate;
G_APPLICATION_CLASS(klass)->local_command_line = G_APPLICATION_CLASS(klass)->local_command_line =
my_application_local_command_line; my_application_local_command_line;
@@ -133,9 +133,9 @@ static void my_application_class_init(MyApplicationClass *klass) {
G_OBJECT_CLASS(klass)->dispose = my_application_dispose; G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
} }
static void my_application_init(MyApplication *self) {} static void my_application_init(MyApplication* self) {}
MyApplication *my_application_new() { MyApplication* my_application_new() {
// Set the program name to the application ID, which helps various systems // Set the program name to the application ID, which helps various systems
// like GTK and desktop environments map this running application to its // like GTK and desktop environments map this running application to its
// corresponding .desktop file. This ensures better integration by allowing // corresponding .desktop file. This ensures better integration by allowing