~ubuntu-branches/ubuntu/hardy/kdebase-workspace/hardy-backports

« back to all changes in this revision

Viewing changes to kwin/effects/desktopgrid.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Richard A. Johnson
  • Date: 2008-05-02 23:57:34 UTC
  • mfrom: (1.2.1 upstream) (20.1.22 hardy)
  • Revision ID: james.westby@ubuntu.com-20080502235734-kwrykz4qcvunwqf4
Tags: 4:4.0.4-0ubuntu1~hardy1
* New upstream release (LP: #225994)
* Updated control file (LP: #220655)
* Updated install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <netwm_def.h>
30
30
#include <qevent.h>
31
31
 
 
32
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
 
33
#include <GL/gl.h>
 
34
#endif
 
35
 
32
36
namespace KWin
33
37
{
34
38
 
132
136
    if( window_move != NULL )
133
137
        desktop_with_move = window_move->isOnAllDesktops()
134
138
            ? posToDesktop( window_move_pos - window_move_diff ) : window_move->desktop();
 
139
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
 
140
    glPushAttrib( GL_SCISSOR_BIT );
 
141
    glEnable( GL_SCISSOR_TEST );
 
142
#endif
135
143
    for( int desktop = 1;
136
144
         desktop <= effects->numberOfDesktops();
137
145
         ++desktop )
138
146
        {
139
147
        if( desktop != desktop_with_move )
 
148
            {
 
149
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
 
150
            QRect area = desktopRect( desktop, true );
 
151
            int dh = displayHeight();
 
152
            // Scissor rect has to be given in OpenGL coords
 
153
            glScissor( area.x(), dh - area.y() - area.height(), area.width(), area.height());
 
154
#endif
140
155
            paintScreenDesktop( desktop, mask, region, data );
 
156
            }
141
157
        }
 
158
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
 
159
    glPopAttrib();
 
160
#endif
142
161
    // paint the desktop with the window being moved as the last one, i.e. on top of others
143
162
    if( desktop_with_move != -1 )
144
163
        paintScreenDesktop( desktop_with_move, mask, region, data );