~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to composite/compwindow.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: compwindow.c,v 1.10 2005/07/03 07:01:17 daniels Exp $
 
2
 * $Id$
 
3
 *
 
4
 * Copyright © 2006 Sun Microsystems
 
5
 *
 
6
 * Permission to use, copy, modify, distribute, and sell this software and its
 
7
 * documentation for any purpose is hereby granted without fee, provided that
 
8
 * the above copyright notice appear in all copies and that both that
 
9
 * copyright notice and this permission notice appear in supporting
 
10
 * documentation, and that the name of Sun Microsystems not be used in
 
11
 * advertising or publicity pertaining to distribution of the software without
 
12
 * specific, written prior permission.  Sun Microsystems makes no
 
13
 * representations about the suitability of this software for any purpose.  It
 
14
 * is provided "as is" without express or implied warranty.
 
15
 *
 
16
 * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
17
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 
18
 * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
19
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
20
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 
21
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
22
 * PERFORMANCE OF THIS SOFTWARE.
3
23
 *
4
24
 * Copyright © 2003 Keith Packard
5
25
 *
124
144
compCheckRedirect (WindowPtr pWin)
125
145
{
126
146
    CompWindowPtr   cw = GetCompWindow (pWin);
 
147
    CompScreenPtr   cs = GetCompScreen(pWin->drawable.pScreen);
127
148
    Bool            should;
128
149
 
129
150
    should = pWin->realized && (pWin->drawable.class != InputOnly) &&
130
151
             (cw != NULL);
131
152
    
 
153
    /* Never redirect the overlay window */
 
154
    if (cs->pOverlayWin != NULL) {
 
155
        if (pWin == cs->pOverlayWin) {
 
156
            should = FALSE;
 
157
        }
 
158
    }   
 
159
    
132
160
    if (should != pWin->redirectDraw)
133
161
    {
134
162
        if (should)
753
781
        }
754
782
    }
755
783
}
 
784
 
 
785
WindowPtr
 
786
CompositeRealChildHead (WindowPtr pWin)
 
787
{
 
788
    WindowPtr pChild, pChildBefore;
 
789
    CompScreenPtr cs;
 
790
 
 
791
    if (!pWin->parent &&
 
792
        (screenIsSaved == SCREEN_SAVER_ON) &&
 
793
        (HasSaverWindow (pWin->drawable.pScreen->myNum))) {
 
794
 
 
795
        /* First child is the screen saver; see if next child is the overlay */
 
796
        pChildBefore = pWin->firstChild;
 
797
        pChild = pChildBefore->nextSib;
 
798
 
 
799
    } else {
 
800
        pChildBefore = NullWindow;
 
801
        pChild = pWin->firstChild;
 
802
    }
 
803
 
 
804
    if (!pChild) {
 
805
        return NullWindow;
 
806
    }
 
807
    
 
808
    cs = GetCompScreen(pWin->drawable.pScreen);
 
809
    if (pChild == cs->pOverlayWin) {
 
810
        return pChild;
 
811
    } else {
 
812
        return pChildBefore;
 
813
    }
 
814
}