summaryrefslogtreecommitdiff
path: root/src/gs-window-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gs-window-x11.c')
-rw-r--r--src/gs-window-x11.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 218a37e..7d6c530 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -56,6 +56,7 @@ enum
#define MAX_QUEUED_EVENTS 16
#define INFO_BAR_SECONDS 30
+#define MATE_SCREENSAVER_DIALOG_PATH LIBEXECDIR "/mate-screensaver-dialog"
struct GSWindowPrivate
{
@@ -506,7 +507,6 @@ static GdkVisual *
get_best_visual_for_display (GdkDisplay *display)
{
GdkScreen *screen;
- char *command;
char *std_output;
int exit_status;
GError *error;
@@ -518,19 +518,18 @@ get_best_visual_for_display (GdkDisplay *display)
visual = NULL;
screen = gdk_display_get_default_screen (display);
- command = g_build_filename (LIBEXECDIR, "mate-screensaver-gl-helper", NULL);
-
error = NULL;
std_output = NULL;
res = spawn_command_line_on_display_sync (display,
- command,
+ MATE_SCREENSAVER_GL_HELPER_PATH,
&std_output,
NULL,
&exit_status,
&error);
if (! res)
{
- gs_debug ("Could not run command '%s': %s", command, error->message);
+ gs_debug ("Could not run command '%s': %s",
+ MATE_SCREENSAVER_GL_HELPER_PATH, error->message);
g_error_free (error);
goto out;
}
@@ -551,7 +550,6 @@ get_best_visual_for_display (GdkDisplay *display)
}
out:
g_free (std_output);
- g_free (command);
return g_object_ref (visual);
}
@@ -617,11 +615,11 @@ remove_watchdog_timer (GSWindow *window)
static void
add_watchdog_timer (GSWindow *window,
- glong timeout)
+ guint timeout)
{
window->priv->watchdog_timer_id = g_timeout_add (timeout,
- (GSourceFunc)watchdog_timer,
- window);
+ (GSourceFunc)watchdog_timer,
+ window);
}
static void
@@ -1535,7 +1533,7 @@ window_set_dialog_up (GSWindow *window,
return;
}
- window->priv->dialog_up = dialog_up;
+ window->priv->dialog_up = (dialog_up != FALSE);
g_object_notify (G_OBJECT (window), "dialog-up");
}
@@ -1697,14 +1695,11 @@ static void
popup_dialog (GSWindow *window)
{
gboolean result;
- char *tmp;
GString *command;
gs_debug ("Popping up dialog");
- tmp = g_build_filename (LIBEXECDIR, "mate-screensaver-dialog", NULL);
- command = g_string_new (tmp);
- g_free (tmp);
+ command = g_string_new (MATE_SCREENSAVER_DIALOG_PATH);
if (is_logout_enabled (window))
{
@@ -1819,7 +1814,7 @@ gs_window_set_lock_enabled (GSWindow *window,
return;
}
- window->priv->lock_enabled = lock_enabled;
+ window->priv->lock_enabled = (lock_enabled != FALSE);
g_object_notify (G_OBJECT (window), "lock-enabled");
}
@@ -1837,7 +1832,7 @@ gs_window_set_keyboard_enabled (GSWindow *window,
{
g_return_if_fail (GS_IS_WINDOW (window));
- window->priv->keyboard_enabled = enabled;
+ window->priv->keyboard_enabled = (enabled != FALSE);
}
void
@@ -1864,7 +1859,7 @@ gs_window_set_logout_enabled (GSWindow *window,
{
g_return_if_fail (GS_IS_WINDOW (window));
- window->priv->logout_enabled = logout_enabled;
+ window->priv->logout_enabled = (logout_enabled != FALSE);
}
void
@@ -1873,7 +1868,7 @@ gs_window_set_user_switch_enabled (GSWindow *window,
{
g_return_if_fail (GS_IS_WINDOW (window));
- window->priv->user_switch_enabled = user_switch_enabled;
+ window->priv->user_switch_enabled = (user_switch_enabled != FALSE);
}
void
@@ -2283,7 +2278,7 @@ window_set_obscured (GSWindow *window,
return;
}
- window->priv->obscured = obscured;
+ window->priv->obscured = (obscured != FALSE);
g_object_notify (G_OBJECT (window), "obscured");
}