~ubuntu-branches/ubuntu/lucid/sawfish/lucid-updates

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2005-02-23 16:16:46 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050223161646-4id6qyw4h9lkvb0v
Tags: 1:1.3+cvs20050222-1
* New cvs release.
* Add an emacs initialisation script to load sawfish.el (Closes: #295290)
* Updated sawfish.el to 1.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* main.c -- Entry point for sawmill
2
 
   $Id: main.c,v 1.46 2001/06/20 21:43:16 jsh Exp $
 
2
   $Id: main.c,v 1.49 2005/01/04 15:34:25 jsh Exp $
3
3
 
4
4
   Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
5
5
 
41
41
#include "build.h"
42
42
#include <string.h>
43
43
#include <limits.h>
 
44
#include <unistd.h>
44
45
#include <X11/Xlocale.h>                /* for setlocale () */
 
46
#ifdef HAVE_GDK_PIXBUF
 
47
#include <glib-object.h>
 
48
#endif
45
49
 
46
50
/* one of the ec_ values */
47
51
int exit_code = ec_no_exit;
48
52
 
49
 
/* Saved value of argv[0] */
50
 
static char *prog_name;
51
 
 
52
53
DEFSYM(sawfish_directory, "sawfish-directory");
53
54
DEFSYM(sawfish_lisp_lib_directory, "sawfish-lisp-lib-directory");
54
55
DEFSYM(sawfish_site_lisp_directory, "sawfish-site-lisp-directory");
98
99
        /* XXX There have been reports of sawmill locking the display,
99
100
           XXX I've never seen it, but this may help, and shouldn't hurt.. */
100
101
        last_event_time = get_server_timestamp ();
101
 
        XUngrabPointer (dpy, last_event_time);
 
102
        ungrab_pointer ();
102
103
        XUngrabKeyboard (dpy, last_event_time);
103
104
        XFlush (dpy);
104
105
    }
333
334
    char **old_argv;
334
335
    int old_argc;
335
336
    char *lang;
 
337
    char *prog_name;
336
338
 
337
339
    /* This will fork multiple copies, if necessary */
338
340
    multihead_init (&argc, &argv);
339
341
    old_argv = argv;
340
342
    old_argc = argc;
341
343
 
 
344
#ifdef HAVE_GDK_PIXBUF
 
345
    g_type_init();
 
346
#endif
 
347
 
342
348
    prog_name = *argv++; argc--;
343
349
    lang = setlocale(LC_ALL, "");
344
350
    rep_init (prog_name, &argc, &argv, 0, 0);
381
387
        return 0;
382
388
   }
383
389
 
 
390
#if defined (DEBUG) && DEBUG == 1
 
391
   setvbuf (stdout, NULL, _IOLBF, BUFSIZ);
 
392
#endif
 
393
 
384
394
    rep_push_structure ("sawfish.wm");
385
395
 
386
396
    if (sys_init(prog_name))