diff options
author | Stefano Karapetsas <[email protected]> | 2014-02-18 14:09:37 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-02-18 14:09:37 +0100 |
commit | 9e02632a1adb6fe53c79839b21cbce4ac0174e5e (patch) | |
tree | 0a5e183de87bcefe1868bda4b4912ac08d170749 /mate-session/main.c | |
parent | 1ef1de009cf1303a92a34104766dd29d3726be46 (diff) | |
parent | e5c421516ea2362f73b764430abafa3e93c6a9e6 (diff) | |
download | mate-session-manager-9e02632a1adb6fe53c79839b21cbce4ac0174e5e.tar.bz2 mate-session-manager-9e02632a1adb6fe53c79839b21cbce4ac0174e5e.tar.xz |
Merge pull request #49 from dnk/gtk3
fix gtk3 warnings
Diffstat (limited to 'mate-session/main.c')
-rw-r--r-- | mate-session/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mate-session/main.c b/mate-session/main.c index 8608852..f09806f 100644 --- a/mate-session/main.c +++ b/mate-session/main.c @@ -468,7 +468,11 @@ int main(int argc, char** argv) { struct sigaction sa; GError* error; +#if GTK_CHECK_VERSION (3, 0, 0) + const char* display_str; +#else char* display_str; +#endif GsmManager* manager; GsmStore* client_store; GsmXsmpServer* xsmp_server; @@ -519,9 +523,15 @@ int main(int argc, char** argv) /* Set DISPLAY explicitly for all our children, in case --display * was specified on the command line. */ +#if GTK_CHECK_VERSION (3, 0, 0) + display_str = gdk_display_get_name (gdk_display_get_default()); +#else display_str = gdk_get_display(); +#endif gsm_util_setenv("DISPLAY", display_str); +#if !GTK_CHECK_VERSION (3, 0, 0) g_free(display_str); +#endif /* Some third-party programs rely on MATE_DESKTOP_SESSION_ID to * detect if MATE is running. We keep this for compatibility reasons. |