static void gs_manager_init (GSManager *manager) { manager->priv = GS_MANAGER_GET_PRIVATE (manager); manager->priv->grab = gs_grab_new (); /* Assume we are the visible session on start. */ manager->priv->visible = TRUE; manager->priv->lock_after = 5; }
static void gs_manager_init (GSManager *manager) { manager->priv = GS_MANAGER_GET_PRIVATE (manager); manager->priv->fade = gs_fade_new (); manager->priv->grab = gs_grab_new (); manager->priv->theme_manager = gs_theme_manager_new (); manager->priv->bg = mate_bg_new (); g_signal_connect (manager->priv->bg, "changed", G_CALLBACK (on_bg_changed), manager); mate_bg_load_from_system_preferences (manager->priv->bg); }
int main (int argc, char **argv) { GError *error = NULL; #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); # ifdef HAVE_BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); # endif textdomain (GETTEXT_PACKAGE); #endif if (! gtk_init_with_args (&argc, &argv, NULL, NULL, NULL, &error)) { fprintf (stderr, "%s", error->message); g_error_free (error); exit (1); } gs_debug_init (TRUE, FALSE); grab = gs_grab_new (); test_window (); /* safety valve in case we can't authenticate */ g_timeout_add (30000, (GSourceFunc)gtk_main_quit, NULL); gtk_main (); g_object_unref (grab); gs_debug_shutdown (); return 0; }
static void gs_manager_init (GSManager *manager) { manager->priv = GS_MANAGER_GET_PRIVATE (manager); // manager->priv->fade = gs_fade_new (); manager->priv->grab = gs_grab_new (); //manager->priv->settings = get_system_settings (); //manager->priv->bg = gnome_bg_new (); /* g_signal_connect (manager->priv->bg, "changed", G_CALLBACK (on_bg_changed), manager); g_signal_connect (manager->priv->settings, "change-event", G_CALLBACK (background_settings_change_event_cb), manager); gnome_bg_load_from_preferences (manager->priv->bg, manager->priv->settings); */ }
int main (int argc, char **argv) { /* if (argc == 2 && 0 == g_strcmp0(argv[1], "-d")) */ g_setenv("G_MESSAGES_DEBUG", "all", FALSE); if (is_application_running(SHUTDOWN_ID_NAME)) { g_warning("another instance of application shutdown is running...\n"); return 0; } singleton(SHUTDOWN_ID_NAME); //remove option -f parse_cmd_line (&argc, &argv); check_version(); init_i18n (); gtk_init (&argc, &argv); gdk_window_set_cursor (gdk_get_default_root_window (), gdk_cursor_new (GDK_LEFT_PTR)); container = create_web_container (FALSE, TRUE); ensure_fullscreen (container); gtk_window_set_decorated (GTK_WINDOW (container), FALSE); gtk_window_set_skip_taskbar_hint (GTK_WINDOW (container), TRUE); gtk_window_set_skip_pager_hint (GTK_WINDOW (container), TRUE); /*gtk_window_set_keep_above (GTK_WINDOW (container), TRUE);*/ gtk_window_fullscreen (GTK_WINDOW (container)); gtk_widget_set_events (GTK_WIDGET (container), gtk_widget_get_events (GTK_WIDGET (container)) | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); webview = d_webview_new_with_uri (SHUTDOWN_HTML_PATH); gtk_container_add (GTK_CONTAINER(container), GTK_WIDGET (webview)); /*g_signal_connect (container, "show", G_CALLBACK (show_cb), NULL);*/ /*g_signal_connect (webview, "focus-out-event", G_CALLBACK( focus_out_cb), NULL);*/ gtk_widget_realize (container); gtk_widget_realize (webview); GdkWindow* gdkwindow = gtk_widget_get_window (container); GdkRGBA rgba = { 0, 0, 0, 0.0 }; gdk_window_set_background_rgba (gdkwindow, &rgba); gdk_window_set_skip_taskbar_hint (gdkwindow, TRUE); gdk_window_set_cursor (gdkwindow, gdk_cursor_new(GDK_LEFT_PTR)); /*gdk_window_set_override_redirect (gdkwindow, TRUE);*/ /*select_popup_events ();*/ /*gdk_window_add_filter (NULL, (GdkFilterFunc)xevent_filter, gdkwindow);*/ dde_bg_g_settings = g_settings_new(SCHEMA_ID); set_background(gtk_widget_get_window(webview), dde_bg_g_settings, gdk_screen_width(), gdk_screen_height()); grab = gs_grab_new (); gtk_widget_show_all (container); gdk_window_focus (gtk_widget_get_window (container), 0); gdk_window_stick (gdkwindow); gtk_main (); return 0; }