Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --disable-wm-check flag like that of xfdesktop and xfce4-panel #5

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions xfsettingsd/main.c
Expand Up @@ -75,6 +75,7 @@

static gboolean opt_version = FALSE;
static gboolean opt_no_daemon = FALSE;
static gboolean opt_disable_wm_check = FALSE;
static gboolean opt_replace = FALSE;
static guint owner_id;

Expand All @@ -100,6 +101,7 @@ static GOptionEntry option_entries[] =
{
{ "version", 'V', 0, G_OPTION_ARG_NONE, &opt_version, N_("Version information"), NULL },
{ "no-daemon", 0, 0, G_OPTION_ARG_NONE, &opt_no_daemon, N_("Do not fork to the background"), NULL },
{ "disable-wm-check", 'D', 0, G_OPTION_ARG_NONE, &opt_disable_wm_check, N_("Do not wait for a window manager on startup"), NULL },
{ "replace", 0, 0, G_OPTION_ARG_NONE, &opt_replace, N_("Replace running xsettings daemon (if any)"), NULL },
{ NULL }
};
Expand Down Expand Up @@ -139,6 +141,10 @@ on_name_acquired (GDBusConnection *connection,
s_data->accessibility_helper = g_object_new (XFCE_TYPE_ACCESSIBILITY_HELPER, NULL);
s_data->shortcuts_helper = g_object_new (XFCE_TYPE_KEYBOARD_SHORTCUTS_HELPER, NULL);
s_data->keyboard_layout_helper = g_object_new (XFCE_TYPE_KEYBOARD_LAYOUT_HELPER, NULL);
if (opt_disable_wm_check)
{
xfce_workspaces_helper_disable_wm_check();
}
s_data->workspaces_helper = g_object_new (XFCE_TYPE_WORKSPACES_HELPER, NULL);
s_data->gtk_decorations_helper = g_object_new (XFCE_TYPE_DECORATIONS_HELPER, NULL);

Expand Down
10 changes: 7 additions & 3 deletions xfsettingsd/workspaces.c
Expand Up @@ -76,7 +76,7 @@ struct _XfceWorkspacesHelperClass
GObjectClass parent;
};


static gboolean global_disable_wm_check = FALSE;

#ifdef GDK_WINDOWING_X11
static Atom atom_net_number_of_desktops = 0;
Expand All @@ -99,7 +99,11 @@ WaitForWM;

G_DEFINE_TYPE(XfceWorkspacesHelper, xfce_workspaces_helper, G_TYPE_OBJECT)


void
xfce_workspaces_helper_disable_wm_check(void)
{
global_disable_wm_check = TRUE;
}

static void
xfce_workspaces_helper_class_init(XfceWorkspacesHelperClass *klass)
Expand Down Expand Up @@ -476,7 +480,7 @@ xfce_workspaces_helper_set_names (XfceWorkspacesHelper *helper,
guint i;
gchar **atom_names;

if (!disable_wm_check)
if (!disable_wm_check && !global_disable_wm_check)
{
/* setup data for wm checking */
wfwm = g_slice_new0 (WaitForWM);
Expand Down
1 change: 1 addition & 0 deletions xfsettingsd/workspaces.h
Expand Up @@ -30,6 +30,7 @@ typedef struct _XfceWorkspacesHelper XfceWorkspacesHelper;
typedef struct _XfceWorkspacesHelperClass XfceWorkspacesHelperClass;

GType xfce_workspaces_helper_get_type(void) G_GNUC_CONST;
void xfce_workspaces_helper_disable_wm_check(void);

G_END_DECLS

Expand Down