lightdm-mini-greeter
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 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);
}