summaryrefslogtreecommitdiff
path: root/mate-session/main.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-05-18 00:05:00 +0200
committerinfirit <[email protected]>2014-05-20 14:51:21 +0200
commit796701300b69c4b008f92e55cd11cf8edc3497eb (patch)
tree8a65fde1816c0d3f990bfa1e0b29cec9acdb26bc /mate-session/main.c
parent1f3832e19b9e40f332999f3622d55a13efcd3b7b (diff)
downloadmate-session-manager-796701300b69c4b008f92e55cd11cf8edc3497eb.tar.bz2
mate-session-manager-796701300b69c4b008f92e55cd11cf8edc3497eb.tar.xz
Use gdk_display* functions for both gtk+2 and gtk+3
The following functions are available in version 2 and 3. gdk_display_get_default GDK_DISPLAY_XDISPLAY gdk_display_get_name gdk_display_get_default
Diffstat (limited to 'mate-session/main.c')
-rw-r--r--mate-session/main.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/mate-session/main.c b/mate-session/main.c
index 63cc5fc..f2831a9 100644
--- a/mate-session/main.c
+++ b/mate-session/main.c
@@ -528,11 +528,7 @@ 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;
@@ -584,15 +580,7 @@ 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.