diff options
| author | Spacedio <spacedio@thernusen.net> | 2026-02-26 19:20:14 -0500 |
|---|---|---|
| committer | Spacedio <spacedio@thernusen.net> | 2026-02-26 19:20:14 -0500 |
| commit | db657412e6ae93341ed42d59df6aef564a739a1f (patch) | |
| tree | 6f67f55f6dc61fb0afa8829a950f0dbf1a0aeadf /src/main.c | |
| download | lightdm-mini-greeter-db657412e6ae93341ed42d59df6aef564a739a1f.tar.gz | |
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..99351c9 --- /dev/null +++ b/src/main.c @@ -0,0 +1,28 @@ +/* lightdm-mini-greeter - A minimal GTK LightDM Greeter */ +#include <sys/mman.h> + +#include <gtk/gtk.h> + +#include "app.h" +#include "utils.h" + + +int main(int argc, char **argv) +{ + mlockall(MCL_CURRENT | MCL_FUTURE); // Keep data out of any swap devices + + App *app = initialize_app(argc, argv); + + connect_to_lightdm_daemon(app->greeter); + begin_authentication_as_default_user(app); + make_session_focus_ring(app); + + for (int m = 0; m < APP_MONITOR_COUNT(app); m++) { + gtk_widget_show_all(GTK_WIDGET(APP_BACKGROUND_WINDOWS(app)[m])); + } + gtk_widget_show_all(GTK_WIDGET(APP_MAIN_WINDOW(app))); + gtk_window_present(APP_MAIN_WINDOW(app)); + gtk_main(); + + destroy_app(app); +} |
