[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: [Bug 46226] Accessibility suggestion for vision impaired
From: Lubos Lunak <l.lunak () kde ! org>
Date: 2007-04-10 14:49:04
Message-ID: 20070410144904.16110.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=46226
l.lunak kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From l.lunak kde org 2007-04-10 16:49 -------
SVN commit 652255 by lunakl:
Add support for dimming of inactive windows (accessibility).
FEATURE: 46226
M +4 -0 COMPOSITE_TODO
M +35 -0 effects.cpp
M +20 -0 effects.h
M +2 -2 effects/CMakeLists.txt
A effects/diminactive.cpp [License: UNKNOWN]
A effects/diminactive.desktop
A effects/diminactive.h [License: UNKNOWN]
M +3 -0 group.cpp
M +9 -0 group.h
M +9 -0 lib/kwineffects.cpp
M +11 -0 lib/kwineffects.h
--- branches/work/kwin_composite/COMPOSITE_TODO #652254:652255
@ -71,7 +71,9 @
* cursorPos() does not work reliably now (not from e.g. timers, it needs events), so it's disabled
+* window grouping is not implemented for unmanaged windows (used e.g. by DimInactive)
+
OpenGL TODO
=================================
@ -237,3 +239,5 @
+ - something that presents all virtual desktops as being in grid (as in pager)
and zooms out of the old one and into the new one
- or whatever
+
+* DimInactive flickers when switching between windows (temporarily no window becomes active)
--- branches/work/kwin_composite/effects.cpp #652254:652255
@ -12,6 +12,7 @
#include "deleted.h"
#include "client.h"
+#include "group.h"
#include "workspace.h"
#include "kdebug.h"
@ -286,6 +287,21 @
sceneWindow()->disablePainting( reason );
}
+void EffectWindowImpl::addRepaint( const QRect& r )
+ {
+ toplevel->addRepaint( r );
+ }
+
+void EffectWindowImpl::addRepaint( int x, int y, int w, int h )
+ {
+ toplevel->addRepaint( x, y, w, h );
+ }
+
+void EffectWindowImpl::addRepaintFull()
+ {
+ toplevel->addRepaintFull();
+ }
+
int EffectWindowImpl::desktop() const
{
return toplevel->desktop();
@ -304,6 +320,13 @
return "";
}
+const EffectWindowGroup* EffectWindowImpl::group() const
+ {
+ if( Client* c = dynamic_cast< Client* >( toplevel ))
+ return c->group()->effectGroup();
+ return NULL; // TODO
+ }
+
bool EffectWindowImpl::isMinimized() const
{
if( Client* c = dynamic_cast<Client*>( toplevel ))
@ -479,5 +502,17 @
return ret;
}
+//****************************************
+// EffectWindowGroupImpl
+//****************************************
+
+EffectWindowList EffectWindowGroupImpl::members() const
+ {
+ EffectWindowList ret;
+ foreach( Toplevel* c, group->members())
+ ret.append( c->effectWindow());
+ return ret;
+ }
+
} // namespace
--- branches/work/kwin_composite/effects.h #652254:652255
@ -64,6 +64,9 @
virtual void enablePainting( int reason );
virtual void disablePainting( int reason );
+ virtual void addRepaint( const QRect& r );
+ virtual void addRepaint( int x, int y, int w, int h );
+ virtual void addRepaintFull();
virtual bool isDeleted() const;
@ -71,6 +74,7 @
virtual int desktop() const; // prefer isOnXXX()
virtual bool isMinimized() const;
virtual QString caption() const;
+ virtual const EffectWindowGroup* group() const;
virtual int x() const;
virtual int y() const;
@ -109,6 +113,22 @
Scene::Window* sw; // This one is used only during paint pass.
};
+class EffectWindowGroupImpl
+ : public EffectWindowGroup
+ {
+ public:
+ EffectWindowGroupImpl( Group* g );
+ virtual EffectWindowList members() const;
+ private:
+ Group* group;
+ };
+
+inline
+EffectWindowGroupImpl::EffectWindowGroupImpl( Group* g )
+ : group( g )
+ {
+ }
+
EffectWindow* effectWindow( Toplevel* w );
EffectWindow* effectWindow( Scene::Window* w );
--- branches/work/kwin_composite/effects/CMakeLists.txt #652254:652255
@ -11,7 +11,7 @
${CMAKE_SOURCE_DIR}/workspace/kwin/lib
)
-KWIN4_ADD_EFFECT(builtins presentwindows.cpp shadow.cpp)
+KWIN4_ADD_EFFECT(builtins presentwindows.cpp shadow.cpp diminactive.cpp)
-install( FILES presentwindows.desktop shadow.desktop
+install( FILES presentwindows.desktop shadow.desktop diminactive.desktop
DESTINATION ${DATA_INSTALL_DIR}/kwin/effects )
--- branches/work/kwin_composite/group.cpp #652254:652255
@ -21,6 +21,7 @
#include "workspace.h"
#include "client.h"
+#include "effects.h"
#include <assert.h>
#include <kstartupinfo.h>
@ -54,12 +55,14 @
leader_info = new NETWinInfo( display(), leader_P, workspace()->rootWin(),
properties, 2 );
}
+ effect_group = new EffectWindowGroupImpl( this );
workspace()->addGroup( this, Allowed );
}
Group::~Group()
{
delete leader_info;
+ delete effect_group;
}
QPixmap Group::icon() const
--- branches/work/kwin_composite/group.h #652254:652255
@ -21,6 +21,7 @
class Client;
class Workspace;
+class EffectWindowGroupImpl;
class Group
{
@ -41,6 +42,7 @
bool groupEvent( XEvent* e );
void updateUserTime( Time time = CurrentTime );
Time userTime() const;
+ EffectWindowGroupImpl* effectGroup();
private:
void getIcons();
void startupIdChanged();
@ -50,6 +52,7 @
Workspace* _workspace;
NETWinInfo* leader_info;
Time user_time;
+ EffectWindowGroupImpl* effect_group;
};
inline Window Group::leader() const
@ -82,6 +85,12 @
return user_time;
}
+inline
+EffectWindowGroupImpl* Group::effectGroup()
+ {
+ return effect_group;
+ }
+
} // namespace
#endif
--- branches/work/kwin_composite/lib/kwineffects.cpp #652254:652255
@ -469,4 +469,13 @
}
+//****************************************
+// EffectWindowGroup
+//****************************************
+
+EffectWindowGroup::~EffectWindowGroup()
+ {
+ }
+
+
} // namespace
--- branches/work/kwin_composite/lib/kwineffects.h #652254:652255
@ -32,6 +32,7 @
class EffectWindow;
+class EffectWindowGroup;
class Effect;
typedef QPair< QString, Effect* > EffectPair;
@ -251,6 +252,9 @
virtual void enablePainting( int reason ) = 0;
virtual void disablePainting( int reason ) = 0;
+ virtual void addRepaint( const QRect& r ) = 0;
+ virtual void addRepaint( int x, int y, int w, int h ) = 0;
+ virtual void addRepaintFull() = 0;
virtual bool isDeleted() const = 0;
virtual bool isMinimized() const = 0;
@ -270,6 +274,7 @
virtual QRect rect() const = 0;
virtual QString caption() const = 0;
+ virtual const EffectWindowGroup* group() const = 0;
virtual bool isDesktop() const = 0;
virtual bool isDock() const = 0;
@ -290,6 +295,12 @
};
+class KWIN_EXPORT EffectWindowGroup
+ {
+ public:
+ virtual ~EffectWindowGroup();
+ virtual EffectWindowList members() const = 0;
+ };
extern KWIN_EXPORT EffectsHandler* effects;
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic