]> Dogcows Code - chaz/tint2/blobdiff - src/clock/clock.c
fixed Issue 282
[chaz/tint2] / src / clock / clock.c
index 273fb818e17991089c391a52a85d1b9dc5ea9924..af6778efa50a28c649d305b793288be764cd35d0 100644 (file)
@@ -22,8 +22,6 @@
 #include <cairo.h>
 #include <cairo-xlib.h>
 #include <pango/pangocairo.h>
-#include <unistd.h>
-#include <signal.h>
 #include <stdlib.h>
 
 #include "window.h"
@@ -33,6 +31,7 @@
 #include "taskbar.h"
 #include "clock.h"
 #include "timer.h"
+#include "common.h"
 
 
 char *time1_format;
@@ -150,6 +149,7 @@ void init_clock_panel(void *p)
        clock->area.parent = p;
        clock->area.panel = p;
        clock->area._draw_foreground = draw_clock;
+       clock->area.size_mode = SIZE_BY_CONTENT;
        clock->area._resize = resize_clock;
        clock->area.resize = 1;
        clock->area.redraw = 1;
@@ -302,17 +302,6 @@ void clock_action(int button)
                command = clock_rclick_command;
                break;
        }
-       if (command) {
-               pid_t pid;
-               pid = fork();
-               if (pid == 0) {
-                       // change for the fork the signal mask
-//                     sigset_t sigset;
-//                     sigprocmask(SIG_SETMASK, &sigset, 0);
-//                     sigprocmask(SIG_UNBLOCK, &sigset, 0);
-                       execl("/bin/sh", "/bin/sh", "-c", command, NULL);
-                       _exit(0);
-               }
-       }
+       tint_exec(command);
 }
 
This page took 0.020762 seconds and 4 git commands to generate.