예제 #1
0
파일: wlc.c 프로젝트: UIKit0/wlc
void
wlc_cleanup(void)
{
   if (wlc.display) {
      wlc_log(WLC_LOG_INFO, "Cleanup wlc");

      // fd process never allocates display
      wlc_compositor_release(&wlc.compositor);
      wl_list_remove(&compositor_listener.link);
      wlc_xwayland_terminate();
      wlc_input_terminate();
      wlc_udev_terminate();
      wlc_fd_terminate();
   }

   // however if main process crashed, fd process does
   // know enough about tty to reset it.
   wlc_tty_terminate();

   if (wlc.display)
      wl_display_destroy(wlc.display);

   // reset te struct, but keep the wlc log state
   FILE *f = wlc.log_file;
   int cached_tm_mday = wlc.cached_tm_mday;
   memset(&wlc, 0, sizeof(wlc));
   wlc_set_log_file(f);
   wlc.cached_tm_mday = cached_tm_mday;
}
예제 #2
0
파일: wlc.c 프로젝트: scarabeusiv/wlc
void
wlc_cleanup(void)
{
   if (wlc.display) {
      wlc_log(WLC_LOG_INFO, "Cleanup wlc");

      // fd process never allocates display
      wlc_compositor_release(&wlc.compositor);
      wl_list_remove(&compositor_listener.link);
      wlc_xwayland_terminate();
      wlc_resources_terminate();
      wlc_input_terminate();
      wlc_udev_terminate();
      wlc_fd_terminate();
   }

   // however if main process crashed, fd process does
   // know enough about tty to reset it.
   wlc_tty_terminate();

   if (wlc.display)
      wl_display_destroy(wlc.display);

   memset(&wlc, 0, sizeof(wlc));
}