Gentoo Archives: gentoo-commits

From: "gecos missing (darkside)" <darkside@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-misc/slim/files: slim-1.3.2-r1-config.diff 261359-fix-SIGTERM-freeze.patch
Date: Tue, 24 Aug 2010 15:30:23
Message-Id: 20100824153019.0FB7C20051@flycatcher.gentoo.org
1 darkside 10/08/24 15:30:18
2
3 Added: slim-1.3.2-r1-config.diff
4 261359-fix-SIGTERM-freeze.patch
5 Log:
6 Revision bump which should improve shutdown behavior by patching a SIGTERM issue and changing the pid file to slim.pid instead of slim.lock. Thanks to Grygoriy I. Fuchedzhy and others in bug 261359
7 (Portage version: 2.1.8.3/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 x11-misc/slim/files/slim-1.3.2-r1-config.diff
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/slim/files/slim-1.3.2-r1-config.diff?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/slim/files/slim-1.3.2-r1-config.diff?rev=1.1&content-type=text/plain
14
15 Index: slim-1.3.2-r1-config.diff
16 ===================================================================
17 --- slim.conf.orig 2010-08-24 10:18:52.344180981 -0500
18 +++ slim.conf 2010-08-24 10:22:20.311234197 -0500
19 @@ -2,7 +2,7 @@
20 # Note: -xauth $authfile is automatically appended
21 default_path /bin:/usr/bin:/usr/local/bin
22 default_xserver /usr/bin/X
23 -#xserver_arguments -dpi 75
24 +xserver_arguments -nolisten tcp -br -deferglyphs 16
25
26 # Commands for halt, login, etc.
27 halt_cmd /sbin/shutdown -h now
28 @@ -18,7 +18,7 @@
29
30
31 # Activate numlock when slim starts. Valid values: on|off
32 -# numlock on
33 +numlock on
34
35 # Hide the mouse cursor (note: does not work with some WMs).
36 # Valid values: true|false
37 @@ -33,7 +33,8 @@
38 # to adjust the command according to your preferred shell,
39 # i.e. for freebsd use:
40 # login_cmd exec /bin/sh - ~/.xinitrc %session
41 -login_cmd exec /bin/bash -login ~/.xinitrc %session
42 +# login_cmd exec /bin/bash -login ~/.xinitrc %session
43 +login_cmd exec /bin/bash -login /etc/X11/xinit/xinitrc
44
45 # Commands executed when starting and exiting a session.
46 # They can be used for registering a X11 session with
47 @@ -41,11 +42,13 @@
48 #
49 # sessionstart_cmd some command
50 # sessionstop_cmd some command
51 +sessionstart_cmd /usr/bin/sessreg -a -l :0.0 %user
52 +sessionstop_cmd /usr/bin/sessreg -d -l :0.0 %user
53
54 # Start in daemon mode. Valid values: yes | no
55 # Note that this can be overriden by the command line
56 # options "-d" and "-nodaemon"
57 -# daemon yes
58 +daemon yes
59
60 # Available sessions (first one is the default).
61 # The current chosen session name is replaced in the login_cmd
62 @@ -53,8 +56,10 @@
63 # see the xinitrc.sample file shipped with slim sources
64 sessions xfce4,icewm,wmaker,blackbox
65
66 -# Executed when pressing F11 (requires imagemagick)
67 +# Executed when pressing F11 (requires media-gfx/imagemagick for import)
68 +# Alternative is media-gfx/scrot. See Gentoo bug 252241 for more info.
69 screenshot_cmd import -window root /slim.png
70 +#screenshot_cmd scrot /root/slim.png
71
72 # welcome message. Available variables: %host, %domain
73 welcome_msg Welcome to %host
74 @@ -83,8 +88,8 @@
75 # randomly choose from
76 current_theme default
77
78 -# Lock file
79 -lockfile /var/run/slim.lock
80 +# Lock file, /etc/init.d/xdm expects slim.pid
81 +lockfile /var/run/slim.pid
82
83 # Log file
84 logfile /var/log/slim.log
85
86
87
88 1.1 x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch
89
90 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch?rev=1.1&view=markup
91 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-misc/slim/files/261359-fix-SIGTERM-freeze.patch?rev=1.1&content-type=text/plain
92
93 Index: 261359-fix-SIGTERM-freeze.patch
94 ===================================================================
95 https://bugs.gentoo.org/show_bug.cgi?id=261359
96 http://developer.berlios.de/bugs/?func=detailbug&bug_id=15326&group_id=2663
97
98 diff --git a/panel.cpp b/panel.cpp
99 index 032574d..075c008 100644
100 --- a/panel.cpp
101 +++ b/panel.cpp
102 @@ -10,6 +10,7 @@
103 */
104
105 #include <sstream>
106 +#include <poll.h>
107 #include "panel.h"
108
109 using namespace std;
110 @@ -288,16 +289,24 @@ void Panel::EventHandler(const Panel::FieldType& curfield) {
111 field=curfield;
112 bool loop = true;
113 OnExpose();
114 +
115 + struct pollfd x11_pfd = {0};
116 + x11_pfd.fd = ConnectionNumber(Dpy);
117 + x11_pfd.events = POLLIN;
118 while(loop) {
119 - XNextEvent(Dpy, &event);
120 - switch(event.type) {
121 - case Expose:
122 - OnExpose();
123 - break;
124 + if(XPending(Dpy) || poll(&x11_pfd, 1, -1) > 0) {
125 + while(XPending(Dpy)) {
126 + XNextEvent(Dpy, &event);
127 + switch(event.type) {
128 + case Expose:
129 + OnExpose();
130 + break;
131
132 - case KeyPress:
133 - loop=OnKeyPress(event);
134 - break;
135 + case KeyPress:
136 + loop=OnKeyPress(event);
137 + break;
138 + }
139 + }
140 }
141 }