Prevent panel and background from being started accidentally
This commit is contained in:
parent
6d34a3c966
commit
aa343f74c6
@ -39,6 +39,16 @@ static void resize_finish_wallpaper(int width, int height) {
|
|||||||
|
|
||||||
int main (int argc, char ** argv) {
|
int main (int argc, char ** argv) {
|
||||||
|
|
||||||
|
if (argc < 2 || strcmp(argv[1],"--really")) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: Desktop environment wallpaper\n"
|
||||||
|
"\n"
|
||||||
|
" Renders the desktop wallpaper. You probably don't want\n"
|
||||||
|
" to be running this directly - it is started by the\n"
|
||||||
|
" session manager along with the panel.\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
wallpaper = malloc(sizeof(sprite_t));
|
wallpaper = malloc(sizeof(sprite_t));
|
||||||
load_sprite(wallpaper, "/usr/share/wallpaper.bmp");
|
load_sprite(wallpaper, "/usr/share/wallpaper.bmp");
|
||||||
wallpaper->alpha = 0;
|
wallpaper->alpha = 0;
|
||||||
|
11
apps/panel.c
11
apps/panel.c
@ -833,6 +833,17 @@ static void sig_usr2(int sig) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, char ** argv) {
|
int main (int argc, char ** argv) {
|
||||||
|
if (argc < 2 || strcmp(argv[1],"--really")) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: Desktop environment panel / dock\n"
|
||||||
|
"\n"
|
||||||
|
" Renders the application menu, window list, widgets,\n"
|
||||||
|
" alt-tab window switcher, clock, etc.\n"
|
||||||
|
" You probably don't want to run this directly - it is\n"
|
||||||
|
" started automatically by the session manager.\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Connect to window server */
|
/* Connect to window server */
|
||||||
yctx = yutani_init();
|
yctx = yutani_init();
|
||||||
|
|
||||||
|
@ -7,16 +7,15 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
|
|
||||||
int _background_pid = fork();
|
int _background_pid = fork();
|
||||||
if (!_background_pid) {
|
if (!_background_pid) {
|
||||||
char * args[] = {"/bin/background", NULL};
|
char * args[] = {"/bin/background", "--really", NULL};
|
||||||
execvp(args[0], args);
|
execvp(args[0], args);
|
||||||
}
|
}
|
||||||
|
|
||||||
int _panel_pid = fork();
|
int _panel_pid = fork();
|
||||||
if (!_panel_pid) {
|
if (!_panel_pid) {
|
||||||
char * args[] = {"/bin/panel", NULL};
|
char * args[] = {"/bin/panel", "--really", NULL};
|
||||||
execvp(args[0], args);
|
execvp(args[0], args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user