/[oroborus]/oroborus/src/oroborus.c
ViewVC logotype

Diff of /oroborus/src/oroborus.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by dreamind, Mon Jul 1 15:40:23 2002 UTC revision 1.8 by dreamind, Tue Jul 2 02:32:11 2002 UTC
# Line 109  Options:\n\ Line 109  Options:\n\
109    -v, --verbose              print more information\n\    -v, --verbose              print more information\n\
110    -h, --help                 display this help and exit\n\    -h, --help                 display this help and exit\n\
111    -V, --version              output version information and exit\n\    -V, --version              output version information and exit\n\
112    --display                  use an alternative display instead of,    --display                  use an alternative display instead of,\n\
113                               $DISPLAY\n\                               $DISPLAY\n\
114  "));  "));
115    exit (status);    exit (status);
# Line 121  decode_switches (int argc, char **argv) Line 121  decode_switches (int argc, char **argv)
121    int c;    int c;
122    
123    while ((c = getopt_long (argc, argv, "v"      /* verbose */    while ((c = getopt_long (argc, argv, "v"      /* verbose */
124                             "h"          /* help */                             "h"  /* help */
125                             "V"          /* version */                             "V"  /* version */
126                             "f:"         /* file */                             "f:" /* file */
127                             "d:",        /* display */                             "d:",        /* display */
128                             long_options, (int *) 0)) != EOF)                             long_options, (int *) 0)) != EOF)
129      {      {
# Line 163  initialize (int argc, char **argv) Line 163  initialize (int argc, char **argv)
163    
164    progname = argv[0];    progname = argv[0];
165    
166    decode_switches(argc, argv);    decode_switches (argc, argv);
167    
168    printf    printf
169      ("\nOroborus\n(c) 2001 Ken Lynch\n(c) 2002 Stefan Pfetzing\nDistributed under the terms and conditions of the GPL\n\n");      ("\nOroborus\n(c) 2001 Ken Lynch\n(c) 2002 Stefan Pfetzing\nDistributed under the terms and conditions of the GPL\n\n");
# Line 181  initialize (int argc, char **argv) Line 181  initialize (int argc, char **argv)
181    dpy = XOpenDisplay (display);    dpy = XOpenDisplay (display);
182    if (!dpy)    if (!dpy)
183      {      {
184        fprintf (stderr, "%s: failed to open display %s!\n", progname, display ? display : ":0" );        fprintf (stderr, "%s: failed to open display %s!\n", progname,
185                   display ? display : getenv ("DISPLAY"));
186        exit (1);        exit (1);
187      }      }
188    
189    act.sa_handler = handleSignal;    act.sa_handler = handleSignal;
190    act.sa_flags = 0;    act.sa_flags = 0;
191    if (sigaction (SIGINT, &act, NULL))    if (sigaction (SIGINT, &act, NULL))
192      fprintf (stderr, "%s: Warning, could not install SIGINT Handler!\n", progname);      fprintf (stderr, "%s: Warning, could not install SIGINT Handler!\n",
193                 progname);
194    if (sigaction (SIGTERM, &act, NULL))    if (sigaction (SIGTERM, &act, NULL))
195      fprintf (stderr, "%s: Warning, could not install SIGTERM Handler!\n", progname);      fprintf (stderr, "%s: Warning, could not install SIGTERM Handler!\n",
196                 progname);
197    if (sigaction (SIGHUP, &act, NULL))    if (sigaction (SIGHUP, &act, NULL))
198      fprintf (stderr, "%s: Warning, could not install SIGHUP Handler!\n", progname);      fprintf (stderr, "%s: Warning, could not install SIGHUP Handler!\n",
199                 progname);
200    if (sigaction (SIGSEGV, &act, NULL))    if (sigaction (SIGSEGV, &act, NULL))
201      fprintf (stderr, "%s: Warning, could not install SIGSEGV Handler!\n", progname);      fprintf (stderr, "%s: Warning, could not install SIGSEGV Handler!\n",
202                 progname);
203    if (sigaction (SIGCHLD, &act, NULL))    if (sigaction (SIGCHLD, &act, NULL))
204      fprintf (stderr, "%s: Warning, could not install SIGCHLD Handler!\n", progname);      fprintf (stderr, "%s: Warning, could not install SIGCHLD Handler!\n",
205                 progname);
206    
207    root = XDefaultRootWindow (dpy);    root = XDefaultRootWindow (dpy);
208    screen = XDefaultScreen (dpy);    screen = XDefaultScreen (dpy);
# Line 211  initialize (int argc, char **argv) Line 217  initialize (int argc, char **argv)
217    
218    shape = XShapeQueryExtension (dpy, &shape_event, &dummy);    shape = XShapeQueryExtension (dpy, &shape_event, &dummy);
219    
220    initICCCMHints (dpy);    initHints (dpy);
   initNETHints (dpy);  
   initMotifHints (dpy);  
   initGnomeHints (dpy);  
221    gnome_win = XCreateSimpleWindow (dpy, root, -1000, -1000, 5, 5, 0, 0, 0);    gnome_win = XCreateSimpleWindow (dpy, root, -1000, -1000, 5, 5, 0, 0, 0);
222    setGnomeHint (dpy, root, win_supporting_wm_check, gnome_win);    setGnomeHint (root, win_supporting_wm_check, gnome_win);
223    setGnomeHint (dpy, gnome_win, win_supporting_wm_check, gnome_win);    setGnomeHint (gnome_win, win_supporting_wm_check, gnome_win);
224    setGnomeHint (dpy, root, win_desktop_button_proxy, gnome_win);    setGnomeHint (root, win_desktop_button_proxy, gnome_win);
225    setGnomeHint (dpy, gnome_win, win_desktop_button_proxy, gnome_win);    setGnomeHint (gnome_win, win_desktop_button_proxy, gnome_win);
226    getGnomeHint (dpy, root, win_workspace, &workspace);    getGnomeHint (root, win_workspace, &workspace);
227    getGnomeDesktopMargins (dpy, margins);    getGnomeDesktopMargins (margins);
228    
229    root_cursor = XCreateFontCursor (dpy, XC_left_ptr);    root_cursor = XCreateFontCursor (dpy, XC_left_ptr);
230    move_cursor = XCreateFontCursor (dpy, XC_fleur);    move_cursor = XCreateFontCursor (dpy, XC_fleur);
# Line 235  initialize (int argc, char **argv) Line 238  initialize (int argc, char **argv)
238      XCreateFontCursor (dpy, XC_bottom_right_corner);      XCreateFontCursor (dpy, XC_bottom_right_corner);
239    XDefineCursor (dpy, root, root_cursor);    XDefineCursor (dpy, root, root_cursor);
240    
241    init_keyboard(dpy);    init_keyboard (dpy);
242    
243    loadSettings ();    loadSettings ();
244    clientFrameAll ();    clientFrameAll ();

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26