static void
gs_manager_create_window_for_monitor (GSManager *manager,
                                      GdkScreen *screen,
                                      int        monitor)
{
        GSWindow    *window;
        GdkRectangle rect;

        gdk_screen_get_monitor_geometry (screen, monitor, &rect);

        gs_debug ("Creating window for monitor %d [%d,%d] (%dx%d)",
                  monitor, rect.x, rect.y, rect.width, rect.height);

        window = gs_window_new (screen, monitor, manager->priv->lock_active);

        gs_window_set_user_switch_enabled (window, manager->priv->user_switch_enabled);
        gs_window_set_away_message (window, manager->priv->away_message);
        gs_window_set_logout_enabled (window, manager->priv->logout_enabled);
        gs_window_set_logout_timeout (window, manager->priv->logout_timeout);
        gs_window_set_logout_command (window, manager->priv->logout_command);
        gs_window_set_keyboard_enabled (window, manager->priv->keyboard_enabled);
        gs_window_set_keyboard_command (window, manager->priv->keyboard_command);

        connect_window_signals (manager, window);

        manager->priv->windows = g_slist_append (manager->priv->windows, window);

        if (manager->priv->active && !manager->priv->fading) {
                gtk_widget_show (GTK_WIDGET (window));
        }
}
static void
test_window (void)
{
        GSWindow  *window;
        gboolean   lock_active;
        gboolean   user_switch_enabled;
        GdkScreen *screen;
        int        monitor;

        lock_active = TRUE;
        screen = gdk_screen_get_default ();
        monitor = 0;

        window = gs_window_new (screen, monitor, lock_active);

        connect_window_signals (window);

        gs_window_show (window);
}
static void
test_window (void)
{
	GSWindow   *window;
	gboolean    lock_active;
	gboolean    user_switch_enabled;
	GdkDisplay *display;
	GdkMonitor *monitor;

	lock_active = TRUE;
	user_switch_enabled = TRUE;
	display = gdk_display_get_default ();
	monitor = gdk_display_get_primary_monitor (display);

	window = gs_window_new (monitor, lock_active);

	gs_window_set_user_switch_enabled (window, user_switch_enabled);

	connect_window_signals (window);

	gs_window_show (window);
}
Exemple #4
0
static void
gs_manager_create_window_for_monitor (GSManager *manager,
                                      GdkScreen *screen,
                                      int        monitor)
{
        GSWindow    *window;
        GdkRectangle rect;

        gdk_screen_get_monitor_geometry (screen, monitor, &rect);

        gs_debug ("Creating window for monitor %d [%d,%d] (%dx%d)",
                  monitor, rect.x, rect.y, rect.width, rect.height);

        window = gs_window_new (screen, monitor);

        connect_window_signals (manager, window);

        manager->priv->windows = g_slist_append (manager->priv->windows, window);

        if (manager->priv->active) {
                gtk_widget_show (GTK_WIDGET (window));
        }
}