Group :: Graphical desktop/Other
RPM: lxde-lxsession
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: lxsession-0.5.2-reload.patch
Download
Download
--- lxsession-0.5.2/Makefile.am.reload 2014-11-29 23:50:05.000000000 +0900
+++ lxsession-0.5.2/Makefile.am 2016-04-30 18:58:15.077331340 +0900
@@ -424,6 +424,7 @@ lxsession_lxsession_VALAFLAGS = \
--pkg gio-2.0 \
--pkg posix \
--pkg lxsettings-daemon \
+ --pkg xevent \
$(buildinclip_VALAFLAGS) \
$(buildinpolkit_VALAFLAGS) \
$(NULL)
--- lxsession-0.5.2/lxsession/main.vala.reload 2014-10-05 08:49:49.000000000 +0900
+++ lxsession-0.5.2/lxsession/main.vala 2016-04-30 18:58:15.077331340 +0900
@@ -96,6 +96,17 @@ namespace Lxsession {
return -1;
}
+ if (xdpy_init() == false)
+ {
+ return 1;
+ }
+
+ if (reload == true)
+ {
+ send_internal_command(LXS_CMD.RELOAD);
+ return 0;
+ }
+
message ("Session is %s",session);
message ("DE is %s", desktop_environnement);
--- lxsession-0.5.2/lxsettings-daemon/xevent.c.reload 2014-10-05 08:49:49.000000000 +0900
+++ lxsession-0.5.2/lxsettings-daemon/xevent.c 2016-04-30 19:00:13.571166225 +0900
@@ -71,13 +71,19 @@ void send_internal_command( int cmd )
XSync(dpy, False);
}
+gboolean xdpy_init()
+{
+ dpy = XOpenDisplay( g_getenv("DISPLAY") );
+ if( ! dpy )
+ return FALSE;
+}
+
gboolean xevent_init()
{
X11Source* xsource;
int fd;
- dpy = XOpenDisplay( g_getenv("DISPLAY") );
- if( ! dpy )
+ if( xdpy_init() == FALSE )
return FALSE;
/* according to the spec, private Atoms should prefix their names with _. */
--- lxsession-0.5.2/vapi/xevent.vapi.reload 2016-04-30 18:58:15.077331340 +0900
+++ lxsession-0.5.2/vapi/xevent.vapi 2016-04-30 18:58:15.077331340 +0900
@@ -0,0 +1,10 @@
+[CCode (cprefix = "LxsessionXEvent", cheader_filename = "lxsettings-daemon/xevent.h")]
+ public static void send_internal_command( int cmd );
+ public static bool xdpy_init();
+
+[CCode (cname = "int", cprefix = "LXS_", cheader_filename = "lxsettings-daemon/xevent.h", has_type_id = false)]
+ public enum LXS_CMD {
+ RELOAD,
+ EXIT,
+ LAST_CMD
+ }