Less warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1031490
This commit is contained in:
parent
839550b975
commit
20f1a79d04
14 changed files with 33 additions and 14 deletions
|
@ -757,6 +757,10 @@ Pixmap Toplevel::createWindowPixmap()
|
|||
}
|
||||
|
||||
#ifdef HAVE_XDAMAGE
|
||||
// We must specify that the two events are a union so the compiler doesn't
|
||||
// complain about strict aliasing rules.
|
||||
typedef union { XEvent e; XDamageNotifyEvent de; } EventUnion;
|
||||
|
||||
void Toplevel::damageNotifyEvent( XDamageNotifyEvent* e )
|
||||
{
|
||||
QRegion damage( e->area.x, e->area.y, e->area.width, e->area.height );
|
||||
|
@ -764,11 +768,11 @@ void Toplevel::damageNotifyEvent( XDamageNotifyEvent* e )
|
|||
int cnt = 1;
|
||||
while( XPending( display()))
|
||||
{
|
||||
XEvent e2;
|
||||
if( XPeekEvent( display(), &e2 ) && e2.type == Extensions::damageNotifyEvent()
|
||||
&& e2.xany.window == frameId())
|
||||
EventUnion e2;
|
||||
if( XPeekEvent( display(), &e2.e ) && e2.e.type == Extensions::damageNotifyEvent()
|
||||
&& e2.e.xany.window == frameId())
|
||||
{
|
||||
XNextEvent( display(), &e2 );
|
||||
XNextEvent( display(), &e2.e );
|
||||
if( cnt > 200 )
|
||||
{
|
||||
// If there are way too many damage events in the queue, just discard them
|
||||
|
@ -778,8 +782,7 @@ void Toplevel::damageNotifyEvent( XDamageNotifyEvent* e )
|
|||
damage = rect();
|
||||
continue;
|
||||
}
|
||||
XDamageNotifyEvent* e = reinterpret_cast< XDamageNotifyEvent* >( &e2 );
|
||||
QRect r( e->area.x, e->area.y, e->area.width, e->area.height );
|
||||
QRect r( e2.de.area.x, e2.de.area.y, e2.de.area.width, e2.de.area.height );
|
||||
++cnt;
|
||||
// If there are too many damaged rectangles, increase them
|
||||
// to be multiples of 100x100 px grid, since QRegion get quite
|
||||
|
|
|
@ -176,11 +176,13 @@ int Workspace::desktopToLeft( int id, bool wrap ) const
|
|||
|
||||
int Workspace::addDesktop( QPoint coords )
|
||||
{ // TODO
|
||||
Q_UNUSED( coords );
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Workspace::deleteDesktop( int id )
|
||||
{ // TODO
|
||||
Q_UNUSED( id );
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QFile>
|
||||
|
||||
#include "kdebug.h"
|
||||
#include "klibloader.h"
|
||||
#include "klibrary.h"
|
||||
#include "kdesktopfile.h"
|
||||
#include "kconfiggroup.h"
|
||||
#include "kstandarddirs.h"
|
||||
|
@ -840,7 +840,7 @@ unsigned long EffectsHandlerImpl::xrenderBufferPicture()
|
|||
KLibrary* EffectsHandlerImpl::findEffectLibrary( KService* service )
|
||||
{
|
||||
QString libname = service->library();
|
||||
KLibrary* library = KLibLoader::self()->library(libname);
|
||||
KLibrary* library = new KLibrary(libname);
|
||||
if( !library )
|
||||
{
|
||||
kError( 1212 ) << "couldn't open library for effect '" <<
|
||||
|
|
|
@ -232,6 +232,7 @@ void BoxSwitchEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Wi
|
|||
void BoxSwitchEffect::windowInputMouseEvent( Window w, QEvent* e )
|
||||
{
|
||||
assert( w == mInput );
|
||||
Q_UNUSED( w );
|
||||
if( e->type() != QEvent::MouseButtonPress )
|
||||
return;
|
||||
QPoint pos = static_cast< QMouseEvent* >( e )->pos();
|
||||
|
@ -272,6 +273,7 @@ void BoxSwitchEffect::windowInputMouseEvent( Window w, QEvent* e )
|
|||
|
||||
void BoxSwitchEffect::windowDamaged( EffectWindow* w, const QRect& damage )
|
||||
{
|
||||
Q_UNUSED( damage );
|
||||
if( mActivated )
|
||||
{
|
||||
if( mMode == TabBoxWindowsMode || mMode == TabBoxWindowsAlternativeMode )
|
||||
|
|
|
@ -1354,6 +1354,7 @@ void CoverSwitchEffect::paintWindowIcon( EffectWindow* w )
|
|||
void CoverSwitchEffect::windowInputMouseEvent( Window w, QEvent* e )
|
||||
{
|
||||
assert( w == input );
|
||||
Q_UNUSED( w );
|
||||
if( e->type() != QEvent::MouseButtonPress )
|
||||
return;
|
||||
// we don't want click events during animations
|
||||
|
|
|
@ -2118,6 +2118,7 @@ void CubeEffect::mouseChanged( const QPoint& pos, const QPoint& oldpos, Qt::Mous
|
|||
void CubeEffect::windowInputMouseEvent( Window w, QEvent* e )
|
||||
{
|
||||
assert( w == input );
|
||||
Q_UNUSED( w );
|
||||
QMouseEvent *mouse = dynamic_cast< QMouseEvent* >( e );
|
||||
if( mouse && mouse->type() == QEvent::MouseButtonRelease )
|
||||
{
|
||||
|
|
|
@ -114,7 +114,7 @@ void CubeEffectConfig::load()
|
|||
bool closeOnMouseRelease = conf.readEntry( "CloseOnMouseRelease", false );
|
||||
bool walkThroughDesktop = conf.readEntry( "TabBox", false );
|
||||
m_ui->zPositionSlider->setValue( conf.readEntry( "ZPosition", 100 ) );
|
||||
m_ui->wallpaperRequester->setPath( conf.readEntry( "Wallpaper", "" ) );
|
||||
m_ui->wallpaperRequester->setUrl( KUrl( conf.readEntry( "Wallpaper", "" ) ));
|
||||
bool invertKeys = conf.readEntry( "InvertKeys", false );
|
||||
bool invertMouse = conf.readEntry( "InvertMouse", false );
|
||||
m_ui->capDeformationSlider->setValue( conf.readEntry( "CapDeformation", 0 ) );
|
||||
|
@ -226,7 +226,7 @@ void CubeEffectConfig::defaults()
|
|||
m_ui->capColorButton->setColor( KColorScheme( QPalette::Active, KColorScheme::Window ).background().color() );
|
||||
m_ui->capsImageBox->setCheckState( Qt::Checked );
|
||||
m_ui->closeOnMouseReleaseBox->setCheckState( Qt::Unchecked );
|
||||
m_ui->wallpaperRequester->setPath( "" );
|
||||
m_ui->wallpaperRequester->setUrl( KUrl( "" ));
|
||||
m_ui->zPositionSlider->setValue( 100 );
|
||||
m_ui->walkThroughDesktopBox->setCheckState( Qt::Unchecked );
|
||||
m_ui->invertKeysBox->setChecked( false );
|
||||
|
|
|
@ -369,7 +369,7 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
|
|||
isDesktop = w->isDesktop();
|
||||
if ( isDesktop )
|
||||
XDefineCursor( display(), input, QCursor( Qt::ClosedHandCursor ).handle() );
|
||||
else if( w != NULL && w->isMovable() || w->isMovableAcrossScreens() )
|
||||
else if( w != NULL && ( w->isMovable() || w->isMovableAcrossScreens() ))
|
||||
{ // Prepare it for moving
|
||||
XDefineCursor( display(), input, QCursor( Qt::ClosedHandCursor ).handle() );
|
||||
windowMoveDiff = w->pos() - unscalePos( me->pos(), NULL );
|
||||
|
|
|
@ -188,6 +188,7 @@ void LogoutEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data
|
|||
{
|
||||
GLRenderTarget* target = effects->popRenderTarget();
|
||||
assert( target == blurTarget );
|
||||
Q_UNUSED( target );
|
||||
|
||||
// Render the blurred scene
|
||||
blurTexture->bind();
|
||||
|
|
|
@ -412,6 +412,7 @@ bool PresentWindowsEffect::borderActivated( ElectricBorder border )
|
|||
void PresentWindowsEffect::windowInputMouseEvent( Window w, QEvent *e )
|
||||
{
|
||||
assert( w == m_input );
|
||||
Q_UNUSED( w );
|
||||
|
||||
// Which window are we hovering over? Always trigger as we don't always get move events before clicking
|
||||
// We cannot use m_motionManager.windowAtPoint() as the window might not be visible
|
||||
|
|
|
@ -155,6 +155,7 @@ void ShadowEffect::updateShadowColor()
|
|||
|
||||
QRect ShadowEffect::shadowRectangle( EffectWindow* w, const QRect& windowRectangle ) const
|
||||
{
|
||||
Q_UNUSED( w );
|
||||
int shadowGrow = shadowFuzzyness + shadowSize;
|
||||
return windowRectangle.adjusted( shadowXOffset - shadowGrow, shadowYOffset - shadowGrow,
|
||||
shadowXOffset + shadowGrow, shadowYOffset + shadowGrow);
|
||||
|
@ -422,6 +423,8 @@ void ShadowEffect::drawQueuedShadows( EffectWindow* behindWindow )
|
|||
// Modified version of SceneOpenGL::Window::prepareRenderStates() from scene_opengl.cpp
|
||||
void ShadowEffect::prepareRenderStates( GLTexture *texture, double opacity, double brightness, double saturation )
|
||||
{
|
||||
Q_UNUSED( texture );
|
||||
Q_UNUSED( saturation );
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
// setup blending of transparent windows
|
||||
glPushAttrib( GL_ENABLE_BIT );
|
||||
|
@ -508,6 +511,7 @@ void ShadowEffect::prepareRenderStates( GLTexture *texture, double opacity, doub
|
|||
// Modified version of SceneOpenGL::Window::restoreRenderStates() from scene_opengl.cpp
|
||||
void ShadowEffect::restoreRenderStates( GLTexture *texture, double opacity, double brightness, double saturation )
|
||||
{
|
||||
Q_UNUSED( texture );
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
if( opacity != 1.0 || saturation != 1.0 || brightness != 1.0 )
|
||||
{
|
||||
|
@ -558,6 +562,7 @@ void ShadowEffect::drawShadowQuadOpenGL( GLTexture *texture, QVector<float> vert
|
|||
void ShadowEffect::drawShadowQuadXRender( XRenderPicture *picture, QRect rect, float xScale, float yScale,
|
||||
QColor color, float opacity, float brightness, float saturation )
|
||||
{
|
||||
Q_UNUSED( saturation );
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
XRenderPicture fill;
|
||||
if( color.isValid() )
|
||||
|
|
|
@ -111,6 +111,7 @@ void TaskbarThumbnailEffect::paintWindow( EffectWindow* w, int mask, QRegion reg
|
|||
|
||||
void TaskbarThumbnailEffect::windowDamaged( EffectWindow* w, const QRect& damage )
|
||||
{
|
||||
Q_UNUSED( damage );
|
||||
// Update the thumbnail if the window was damaged
|
||||
foreach( EffectWindow* window, thumbnails.keys() )
|
||||
foreach( const Data &thumb, thumbnails.values( window ))
|
||||
|
|
|
@ -1225,7 +1225,7 @@ void Client::checkWorkspacePosition()
|
|||
newGeom.x() != leftMax )
|
||||
{ // Left was touching before but isn't anymore
|
||||
// If the other side was touching make sure it still is afterwards
|
||||
if( newGeom.y() == newGeom.x() + newGeom.width() == oldRightMax )
|
||||
if( newGeom.x() + newGeom.width() == oldRightMax )
|
||||
newGeom.setLeft( qMax( leftMax, screenArea.x() ));
|
||||
else
|
||||
newGeom.moveLeft( qMax( leftMax, screenArea.x() ));
|
||||
|
|
|
@ -87,8 +87,8 @@ void Monitor::resizeEvent( QResizeEvent* e )
|
|||
void Monitor::checkSize()
|
||||
{
|
||||
QRect contentsRect = previewRect();
|
||||
int w = 151;
|
||||
int h = 115;
|
||||
//int w = 151;
|
||||
//int h = 115;
|
||||
view->setGeometry(contentsRect);
|
||||
scene->setSceneRect(QRect(QPoint(0,0), contentsRect.size()));
|
||||
int x2 = ( contentsRect.width() - 20 ) / 2;
|
||||
|
@ -275,12 +275,14 @@ void Monitor::Corner::paint( QPainter* painter, const QStyleOptionGraphicsItem*
|
|||
|
||||
void Monitor::Corner::hoverEnterEvent( QGraphicsSceneHoverEvent * e)
|
||||
{
|
||||
Q_UNUSED( e );
|
||||
m_hover = true;
|
||||
update();
|
||||
}
|
||||
|
||||
void Monitor::Corner::hoverLeaveEvent( QGraphicsSceneHoverEvent * e)
|
||||
{
|
||||
Q_UNUSED( e );
|
||||
m_hover = false;
|
||||
update();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue