~ubuntu-branches/ubuntu/natty/sawfish/natty

« back to all changes in this revision

Viewing changes to src/events.c

  • Committer: Bazaar Package Importer
  • Author(s): Luis Rodrigo Gallardo Cruz
  • Date: 2009-11-23 09:05:20 UTC
  • mfrom: (0.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20091123090520-m588qe37wtxzr2b5
Tags: upstream-1.5.3
ImportĀ upstreamĀ versionĀ 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* events.c -- Event handling
2
 
   $Id: events.c 4301 2008-11-19 20:45:08Z chrisb $
 
2
   $Id$
3
3
 
4
4
   Copyright (C) 1999 John Harper <john@dcs.warwick.ac.uk>
5
5
 
6
 
   This file is part of sawmill.
 
6
   This file is part of sawfish.
7
7
 
8
 
   sawmill is free software; you can redistribute it and/or modify it
 
8
   sawfish is free software; you can redistribute it and/or modify it
9
9
   under the terms of the GNU General Public License as published by
10
10
   the Free Software Foundation; either version 2, or (at your option)
11
11
   any later version.
12
12
 
13
 
   sawmill is distributed in the hope that it will be useful, but
 
13
   sawfish is distributed in the hope that it will be useful, but
14
14
   WITHOUT ANY WARRANTY; without even the implied warranty of
15
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
16
   GNU General Public License for more details.
17
17
 
18
18
   You should have received a copy of the GNU General Public License
19
 
   along with sawmill; see the file COPYING.   If not, write to
 
19
   along with sawfish; see the file COPYING.   If not, write to
20
20
   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21
21
 
22
 
#include "sawmill.h"
 
22
#include "sawfish.h"
23
23
#include <limits.h>
24
24
#include <stdint.h>
25
25
#include <string.h>
67
67
 
68
68
static XID event_handler_context;
69
69
 
70
 
static Atom xa_sawmill_timestamp;
 
70
static Atom xa_sawfish_timestamp;
71
71
 
72
72
DEFSYM(visibility_notify_hook, "visibility-notify-hook");
73
73
DEFSYM(destroy_notify_hook, "destroy-notify-hook");
747
747
    Lisp_Window *w = find_window_by_id (id);
748
748
    if (w == 0)
749
749
    {
750
 
        /* Also adds the frame. */
 
750
        /* Also adds the frame. */
751
751
        w = add_window (id);
752
752
        if (w == 0)
753
753
        {
754
754
            fprintf (stderr, "warning: failed to allocate a window\n");
755
755
            return;
756
756
        }
757
 
        if (w->wmhints && w->wmhints->flags & StateHint
758
 
            && w->wmhints->initial_state == IconicState)
759
 
        {
760
 
            rep_call_lisp1 (module_symbol_value (rep_VAL (&iconify_mod),
761
 
                                                 Qiconify_window), rep_VAL(w));
762
 
        }
763
757
    }
764
758
    else
765
759
    {
1348
1342
    /* XXX There must be an easier method.. */
1349
1343
    while (XCheckWindowEvent (dpy, w, PropertyChangeMask, &ev)) ;
1350
1344
    XSelectInput (dpy, w, PropertyChangeMask | KeyPressMask);
1351
 
    XChangeProperty (dpy, w, xa_sawmill_timestamp,
 
1345
    XChangeProperty (dpy, w, xa_sawfish_timestamp,
1352
1346
                     XA_STRING, 8, PropModeReplace, (unsigned char *)"foo", 3);
1353
1347
    XSelectInput (dpy, w, KeyPressMask);
1354
1348
    XWindowEvent (dpy, w, PropertyChangeMask, &ev);
1836
1830
 
1837
1831
    if(!batch_mode_p ())
1838
1832
    {
1839
 
        xa_sawmill_timestamp = XInternAtom (dpy, "_SAWMILL_TIMESTAMP", False);
 
1833
        xa_sawfish_timestamp = XInternAtom (dpy, "_SAWFISH_TIMESTAMP", False);
1840
1834
        last_event_time = get_server_timestamp ();
1841
1835
    }
1842
1836
}