Skip to content

Commit 86d2423

Browse files
committed
fix display
1 parent 7bee235 commit 86d2423

File tree

5 files changed

+29
-18
lines changed

5 files changed

+29
-18
lines changed

build/pulsar

0 Bytes
Binary file not shown.

pulsar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void pulsar_context_init(pulsar_context_t *pulsar_context)
88
pulsar_context->region.width = 0;
99
pulsar_context->region.height = 0;
1010
pulsar_context->region.init = 1;
11-
pulsar_context->display = XOpenDisplay(NULL);
11+
pulsar_context->display = XOpenDisplay(":0");
1212
pulsar_context->root = RootWindow(pulsar_context->display, DefaultScreen(pulsar_context->display));
1313
STAILQ_INIT(&pulsar_context->pending_list);
1414
pthread_mutex_init(&pulsar_context->mutex, NULL);

pulsar.desktop

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
#!/bin/bash
2-
xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita"
3-
nohup Xorg :0 -noreset -logfile /tmp/0.log -config /etc/xorg.conf &
4-
sleep 1
5-
nohup xfce4-session &
6-
7-
# monitor pulsar exit, then restart
8-
while :
9-
do
10-
ps ax | egrep "pulsar$"
11-
if [ $? -ne 0 ]
12-
then
13-
nohup pulsar &
14-
fi
15-
sleep 2
16-
done
1+
[Desktop Entry]
2+
Encoding=UTF-8
3+
Version=0.9.4
4+
Type=Application
5+
Name=pulsar
6+
Comment=pulsar
7+
Exec=pulsar
8+
OnlyShowIn=XFCE;
9+
StartupNotify=false
10+
Terminal=false
11+
Hidden=false

start.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita"
3+
nohup Xorg :0 -noreset -logfile /tmp/0.log -config /etc/xorg.conf &
4+
sleep 1
5+
nohup xfce4-session &
6+
7+
# monitor pulsar exit, then restart
8+
while :
9+
do
10+
ps ax | egrep "pulsar$"
11+
if [ $? -ne 0 ]
12+
then
13+
nohup pulsar &
14+
fi
15+
sleep 2
16+
done

ws_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static struct lws_protocols protocols[] = {
176176

177177
void start_ws_server(pulsar_config_t *pulsar_config)
178178
{
179-
display = XOpenDisplay(NULL);
179+
display = XOpenDisplay(":0");
180180
root = RootWindow(display, DefaultScreen(display));
181181
struct lws_context *context;
182182
struct lws_context_creation_info info;

0 commit comments

Comments
 (0)