Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Workspace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Workspace
Commits
4fd08556
Commit
4fd08556
authored
Jan 30, 2011
by
Martin Flöser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KWin uses kdelibs coding style.
parent
63d5c0c7
Changes
190
Hide whitespace changes
Inline
Side-by-side
Showing
190 changed files
with
17662 additions
and
19683 deletions
+17662
-19683
kwin/activation.cpp
kwin/activation.cpp
+380
-427
kwin/atoms.cpp
kwin/atoms.cpp
+11
-11
kwin/atoms.h
kwin/atoms.h
+29
-29
kwin/bridge.cpp
kwin/bridge.cpp
+171
-177
kwin/bridge.h
kwin/bridge.h
+63
-63
kwin/client.cpp
kwin/client.cpp
+1075
-1153
kwin/client.h
kwin/client.h
+778
-757
kwin/clientgroup.cpp
kwin/clientgroup.cpp
+198
-212
kwin/clientgroup.h
kwin/clientgroup.h
+153
-152
kwin/composite.cpp
kwin/composite.cpp
+505
-552
kwin/compositingprefs.cpp
kwin/compositingprefs.cpp
+92
-103
kwin/compositingprefs.h
kwin/compositingprefs.h
+9
-3
kwin/deleted.cpp
kwin/deleted.cpp
+55
-57
kwin/deleted.h
kwin/deleted.h
+56
-46
kwin/desktopchangeosd.cpp
kwin/desktopchangeosd.cpp
+331
-385
kwin/desktopchangeosd.h
kwin/desktopchangeosd.h
+118
-101
kwin/desktoplayout.cpp
kwin/desktoplayout.cpp
+101
-108
kwin/effects.cpp
kwin/effects.cpp
+1018
-1099
kwin/effects.h
kwin/effects.h
+356
-363
kwin/effects/_test/demo_liquid.cpp
kwin/effects/_test/demo_liquid.cpp
+31
-36
kwin/effects/_test/demo_liquid.h
kwin/effects/_test/demo_liquid.h
+16
-16
kwin/effects/_test/demo_shakymove.cpp
kwin/effects/_test/demo_shakymove.cpp
+40
-44
kwin/effects/_test/demo_shakymove.h
kwin/effects/_test/demo_shakymove.h
+14
-14
kwin/effects/_test/demo_shiftworkspaceup.cpp
kwin/effects/_test/demo_shiftworkspaceup.cpp
+27
-27
kwin/effects/_test/demo_shiftworkspaceup.h
kwin/effects/_test/demo_shiftworkspaceup.h
+13
-13
kwin/effects/_test/demo_showpicture.cpp
kwin/effects/_test/demo_showpicture.cpp
+27
-29
kwin/effects/_test/demo_showpicture.h
kwin/effects/_test/demo_showpicture.h
+11
-11
kwin/effects/_test/demo_wavywindows.cpp
kwin/effects/_test/demo_wavywindows.cpp
+28
-30
kwin/effects/_test/demo_wavywindows.h
kwin/effects/_test/demo_wavywindows.h
+12
-12
kwin/effects/_test/drunken.cpp
kwin/effects/_test/drunken.cpp
+34
-36
kwin/effects/_test/drunken.h
kwin/effects/_test/drunken.h
+11
-11
kwin/effects/_test/flame.cpp
kwin/effects/_test/flame.cpp
+37
-43
kwin/effects/_test/flame.h
kwin/effects/_test/flame.h
+11
-11
kwin/effects/_test/gears.cpp
kwin/effects/_test/gears.cpp
+150
-161
kwin/effects/_test/gears.h
kwin/effects/_test/gears.h
+22
-22
kwin/effects/_test/howto.cpp
kwin/effects/_test/howto.cpp
+34
-44
kwin/effects/_test/howto.h
kwin/effects/_test/howto.h
+33
-33
kwin/effects/_test/kicker/kicker.cpp
kwin/effects/_test/kicker/kicker.cpp
+91
-109
kwin/effects/_test/kicker/kicker.h
kwin/effects/_test/kicker/kicker.h
+24
-24
kwin/effects/_test/slidetabs/slidetabs.cpp
kwin/effects/_test/slidetabs/slidetabs.cpp
+100
-109
kwin/effects/_test/slidetabs/slidetabs.h
kwin/effects/_test/slidetabs/slidetabs.h
+23
-23
kwin/effects/_test/slidetabs/slidetabs_config.cpp
kwin/effects/_test/slidetabs/slidetabs_config.cpp
+38
-38
kwin/effects/_test/slidetabs/slidetabs_config.h
kwin/effects/_test/slidetabs/slidetabs_config.h
+14
-14
kwin/effects/_test/swiveltabs/swiveltabs.cpp
kwin/effects/_test/swiveltabs/swiveltabs.cpp
+85
-96
kwin/effects/_test/swiveltabs/swiveltabs.h
kwin/effects/_test/swiveltabs/swiveltabs.h
+27
-28
kwin/effects/_test/swiveltabs/swiveltabs_config.cpp
kwin/effects/_test/swiveltabs/swiveltabs_config.cpp
+40
-40
kwin/effects/_test/swiveltabs/swiveltabs_config.h
kwin/effects/_test/swiveltabs/swiveltabs_config.h
+15
-15
kwin/effects/_test/test_fbo.cpp
kwin/effects/_test/test_fbo.cpp
+29
-31
kwin/effects/_test/test_fbo.h
kwin/effects/_test/test_fbo.h
+13
-13
kwin/effects/_test/test_input.cpp
kwin/effects/_test/test_input.cpp
+26
-28
kwin/effects/_test/test_input.h
kwin/effects/_test/test_input.h
+10
-10
kwin/effects/_test/test_thumbnail.cpp
kwin/effects/_test/test_thumbnail.cpp
+36
-38
kwin/effects/_test/test_thumbnail.h
kwin/effects/_test/test_thumbnail.h
+12
-12
kwin/effects/_test/videorecord.cpp
kwin/effects/_test/videorecord.cpp
+66
-71
kwin/effects/_test/videorecord.h
kwin/effects/_test/videorecord.h
+17
-17
kwin/effects/_test/videorecord_config.cpp
kwin/effects/_test/videorecord_config.cpp
+30
-30
kwin/effects/_test/videorecord_config.h
kwin/effects/_test/videorecord_config.h
+14
-14
kwin/effects/blur/blur.cpp
kwin/effects/blur/blur.cpp
+12
-13
kwin/effects/blur/blur.h
kwin/effects/blur/blur.h
+1
-1
kwin/effects/blur/blurshader.cpp
kwin/effects/blur/blurshader.cpp
+6
-7
kwin/effects/blur/blurshader.h
kwin/effects/blur/blurshader.h
+12
-4
kwin/effects/boxswitch/boxswitch.cpp
kwin/effects/boxswitch/boxswitch.cpp
+556
-713
kwin/effects/boxswitch/boxswitch.h
kwin/effects/boxswitch/boxswitch.h
+93
-94
kwin/effects/boxswitch/boxswitch_config.cpp
kwin/effects/boxswitch/boxswitch_config.cpp
+34
-34
kwin/effects/boxswitch/boxswitch_config.h
kwin/effects/boxswitch/boxswitch_config.h
+15
-15
kwin/effects/boxswitch/boxswitch_proxy.cpp
kwin/effects/boxswitch/boxswitch_proxy.cpp
+16
-16
kwin/effects/boxswitch/boxswitch_proxy.h
kwin/effects/boxswitch/boxswitch_proxy.h
+16
-16
kwin/effects/configs_builtins.cpp
kwin/effects/configs_builtins.cpp
+25
-25
kwin/effects/coverswitch/coverswitch.cpp
kwin/effects/coverswitch/coverswitch.cpp
+486
-622
kwin/effects/coverswitch/coverswitch.h
kwin/effects/coverswitch/coverswitch.h
+68
-69
kwin/effects/coverswitch/coverswitch_config.cpp
kwin/effects/coverswitch/coverswitch_config.cpp
+57
-57
kwin/effects/coverswitch/coverswitch_config.h
kwin/effects/coverswitch/coverswitch_config.h
+14
-14
kwin/effects/cube/cube.cpp
kwin/effects/cube/cube.cpp
+1063
-1304
kwin/effects/cube/cube.h
kwin/effects/cube/cube.h
+135
-138
kwin/effects/cube/cube_config.cpp
kwin/effects/cube/cube_config.cpp
+132
-153
kwin/effects/cube/cube_config.h
kwin/effects/cube/cube_config.h
+17
-17
kwin/effects/cube/cube_inside.h
kwin/effects/cube/cube_inside.h
+5
-5
kwin/effects/cube/cube_proxy.cpp
kwin/effects/cube/cube_proxy.cpp
+16
-16
kwin/effects/cube/cube_proxy.h
kwin/effects/cube/cube_proxy.h
+7
-7
kwin/effects/cube/cubeslide.cpp
kwin/effects/cube/cubeslide.cpp
+405
-505
kwin/effects/cube/cubeslide.h
kwin/effects/cube/cubeslide.h
+39
-40
kwin/effects/cube/cubeslide_config.cpp
kwin/effects/cube/cubeslide_config.cpp
+32
-32
kwin/effects/cube/cubeslide_config.h
kwin/effects/cube/cubeslide_config.h
+13
-13
kwin/effects/dashboard/dashboard.cpp
kwin/effects/dashboard/dashboard.cpp
+81
-102
kwin/effects/dashboard/dashboard.h
kwin/effects/dashboard/dashboard.h
+29
-29
kwin/effects/dashboard/dashboard_config.h
kwin/effects/dashboard/dashboard_config.h
+1
-1
kwin/effects/desktopgrid/desktopgrid.cpp
kwin/effects/desktopgrid/desktopgrid.cpp
+873
-1064
kwin/effects/desktopgrid/desktopgrid.h
kwin/effects/desktopgrid/desktopgrid.h
+111
-111
kwin/effects/desktopgrid/desktopgrid_config.cpp
kwin/effects/desktopgrid/desktopgrid_config.cpp
+91
-94
kwin/effects/desktopgrid/desktopgrid_config.h
kwin/effects/desktopgrid/desktopgrid_config.h
+20
-20
kwin/effects/dialogparent/dialogparent.cpp
kwin/effects/dialogparent/dialogparent.cpp
+40
-46
kwin/effects/dialogparent/dialogparent.h
kwin/effects/dialogparent/dialogparent.h
+19
-19
kwin/effects/diminactive/diminactive.cpp
kwin/effects/diminactive/diminactive.cpp
+63
-70
kwin/effects/diminactive/diminactive.h
kwin/effects/diminactive/diminactive.h
+20
-20
kwin/effects/diminactive/diminactive_config.cpp
kwin/effects/diminactive/diminactive_config.cpp
+11
-11
kwin/effects/diminactive/diminactive_config.h
kwin/effects/diminactive/diminactive_config.h
+11
-11
kwin/effects/dimscreen/dimscreen.cpp
kwin/effects/dimscreen/dimscreen.cpp
+48
-56
kwin/effects/dimscreen/dimscreen.h
kwin/effects/dimscreen/dimscreen.h
+18
-18
kwin/effects/explosion/explosion.cpp
kwin/effects/explosion/explosion.cpp
+58
-73
kwin/effects/explosion/explosion.h
kwin/effects/explosion/explosion.h
+28
-28
kwin/effects/fade/fade.cpp
kwin/effects/fade/fade.cpp
+113
-129
kwin/effects/fade/fade.h
kwin/effects/fade/fade.h
+35
-35
kwin/effects/fadedesktop/fadedesktop.cpp
kwin/effects/fadedesktop/fadedesktop.cpp
+48
-54
kwin/effects/fadedesktop/fadedesktop.h
kwin/effects/fadedesktop/fadedesktop.h
+15
-15
kwin/effects/fallapart/fallapart.cpp
kwin/effects/fallapart/fallapart.cpp
+78
-86
kwin/effects/fallapart/fallapart.h
kwin/effects/fallapart/fallapart.h
+15
-15
kwin/effects/flipswitch/flipswitch.cpp
kwin/effects/flipswitch/flipswitch.cpp
+534
-674
kwin/effects/flipswitch/flipswitch.h
kwin/effects/flipswitch/flipswitch.h
+77
-79
kwin/effects/flipswitch/flipswitch_config.cpp
kwin/effects/flipswitch/flipswitch_config.cpp
+41
-41
kwin/effects/flipswitch/flipswitch_config.h
kwin/effects/flipswitch/flipswitch_config.h
+16
-16
kwin/effects/glide/glide.cpp
kwin/effects/glide/glide.cpp
+129
-138
kwin/effects/glide/glide.h
kwin/effects/glide/glide.h
+41
-43
kwin/effects/glide/glide_config.cpp
kwin/effects/glide/glide_config.cpp
+16
-16
kwin/effects/highlightwindow/highlightwindow.cpp
kwin/effects/highlightwindow/highlightwindow.cpp
+106
-111
kwin/effects/highlightwindow/highlightwindow.h
kwin/effects/highlightwindow/highlightwindow.h
+41
-41
kwin/effects/invert/invert.cpp
kwin/effects/invert/invert.cpp
+52
-56
kwin/effects/invert/invert.h
kwin/effects/invert/invert.h
+27
-27
kwin/effects/invert/invert_config.cpp
kwin/effects/invert/invert_config.cpp
+18
-18
kwin/effects/invert/invert_config.h
kwin/effects/invert/invert_config.h
+13
-13
kwin/effects/login/login.cpp
kwin/effects/login/login.cpp
+41
-46
kwin/effects/login/login.h
kwin/effects/login/login.h
+13
-13
kwin/effects/logout/logout.cpp
kwin/effects/logout/logout.cpp
+184
-205
kwin/effects/logout/logout.h
kwin/effects/logout/logout.h
+33
-33
kwin/effects/lookingglass/lookingglass.cpp
kwin/effects/lookingglass/lookingglass.cpp
+65
-75
kwin/effects/lookingglass/lookingglass.h
kwin/effects/lookingglass/lookingglass.h
+35
-35
kwin/effects/lookingglass/lookingglass_config.cpp
kwin/effects/lookingglass/lookingglass_config.cpp
+19
-19
kwin/effects/lookingglass/lookingglass_config.h
kwin/effects/lookingglass/lookingglass_config.h
+15
-15
kwin/effects/magiclamp/magiclamp.cpp
kwin/effects/magiclamp/magiclamp.cpp
+166
-207
kwin/effects/magiclamp/magiclamp.h
kwin/effects/magiclamp/magiclamp.h
+28
-29
kwin/effects/magiclamp/magiclamp_config.cpp
kwin/effects/magiclamp/magiclamp_config.cpp
+17
-17
kwin/effects/magiclamp/magiclamp_config.h
kwin/effects/magiclamp/magiclamp_config.h
+13
-13
kwin/effects/magnifier/magnifier.cpp
kwin/effects/magnifier/magnifier.cpp
+69
-79
kwin/effects/magnifier/magnifier.h
kwin/effects/magnifier/magnifier.h
+21
-21
kwin/effects/magnifier/magnifier_config.cpp
kwin/effects/magnifier/magnifier_config.cpp
+17
-17
kwin/effects/magnifier/magnifier_config.h
kwin/effects/magnifier/magnifier_config.h
+15
-15
kwin/effects/minimizeanimation/minimizeanimation.cpp
kwin/effects/minimizeanimation/minimizeanimation.cpp
+46
-52
kwin/effects/minimizeanimation/minimizeanimation.h
kwin/effects/minimizeanimation/minimizeanimation.h
+17
-17
kwin/effects/mousemark/mousemark.cpp
kwin/effects/mousemark/mousemark.cpp
+75
-86
kwin/effects/mousemark/mousemark.h
kwin/effects/mousemark/mousemark.h
+21
-21
kwin/effects/mousemark/mousemark_config.cpp
kwin/effects/mousemark/mousemark_config.cpp
+20
-20
kwin/effects/mousemark/mousemark_config.h
kwin/effects/mousemark/mousemark_config.h
+15
-15
kwin/effects/presentwindows/presentwindows.cpp
kwin/effects/presentwindows/presentwindows.cpp
+1129
-1310
kwin/effects/presentwindows/presentwindows.h
kwin/effects/presentwindows/presentwindows.h
+219
-215
kwin/effects/presentwindows/presentwindows_config.cpp
kwin/effects/presentwindows/presentwindows_config.cpp
+112
-112
kwin/effects/presentwindows/presentwindows_config.h
kwin/effects/presentwindows/presentwindows_config.h
+16
-16
kwin/effects/presentwindows/presentwindows_proxy.cpp
kwin/effects/presentwindows/presentwindows_proxy.cpp
+9
-9
kwin/effects/presentwindows/presentwindows_proxy.h
kwin/effects/presentwindows/presentwindows_proxy.h
+8
-8
kwin/effects/resize/resize.cpp
kwin/effects/resize/resize.cpp
+63
-73
kwin/effects/resize/resize.h
kwin/effects/resize/resize.h
+21
-19
kwin/effects/resize/resize_config.cpp
kwin/effects/resize/resize_config.cpp
+26
-26
kwin/effects/resize/resize_config.h
kwin/effects/resize/resize_config.h
+12
-12
kwin/effects/scalein/scalein.cpp
kwin/effects/scalein/scalein.cpp
+42
-45
kwin/effects/scalein/scalein.h
kwin/effects/scalein/scalein.h
+13
-13
kwin/effects/screenshot/screenshot.cpp
kwin/effects/screenshot/screenshot.cpp
+58
-71
kwin/effects/screenshot/screenshot.h
kwin/effects/screenshot/screenshot.h
+23
-24
kwin/effects/sheet/sheet.cpp
kwin/effects/sheet/sheet.cpp
+89
-102
kwin/effects/sheet/sheet.h
kwin/effects/sheet/sheet.h
+34
-35
kwin/effects/showfps/showfps.cpp
kwin/effects/showfps/showfps.cpp
+195
-212
kwin/effects/showfps/showfps.h
kwin/effects/showfps/showfps.h
+35
-35
kwin/effects/showfps/showfps_config.cpp
kwin/effects/showfps/showfps_config.cpp
+16
-16
kwin/effects/showfps/showfps_config.h
kwin/effects/showfps/showfps_config.h
+13
-13
kwin/effects/showpaint/showpaint.cpp
kwin/effects/showpaint/showpaint.cpp
+35
-34
kwin/effects/showpaint/showpaint.h
kwin/effects/showpaint/showpaint.h
+12
-12
kwin/effects/slide/slide.cpp
kwin/effects/slide/slide.cpp
+127
-147
kwin/effects/slide/slide.h
kwin/effects/slide/slide.h
+20
-20
kwin/effects/slideback/slideback.cpp
kwin/effects/slideback/slideback.cpp
+204
-267
kwin/effects/slideback/slideback.h
kwin/effects/slideback/slideback.h
+46
-46
kwin/effects/slidingpopups/slidingpopups.cpp
kwin/effects/slidingpopups/slidingpopups.cpp
+110
-126
kwin/effects/slidingpopups/slidingpopups.h
kwin/effects/slidingpopups/slidingpopups.h
+33
-35
kwin/effects/snaphelper/snaphelper.cpp
kwin/effects/snaphelper/snaphelper.cpp
+54
-60
kwin/effects/snaphelper/snaphelper.h
kwin/effects/snaphelper/snaphelper.h
+20
-20
kwin/effects/startupfeedback/startupfeedback.cpp
kwin/effects/startupfeedback/startupfeedback.cpp
+184
-210
kwin/effects/startupfeedback/startupfeedback.h
kwin/effects/startupfeedback/startupfeedback.h
+39
-40
kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp
kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp
+76
-81
kwin/effects/taskbarthumbnail/taskbarthumbnail.h
kwin/effects/taskbarthumbnail/taskbarthumbnail.h
+19
-20
kwin/effects/thumbnailaside/thumbnailaside.cpp
kwin/effects/thumbnailaside/thumbnailaside.cpp
+82
-91
kwin/effects/thumbnailaside/thumbnailaside.h
kwin/effects/thumbnailaside/thumbnailaside.h
+25
-26
kwin/effects/thumbnailaside/thumbnailaside_config.cpp
kwin/effects/thumbnailaside/thumbnailaside_config.cpp
+17
-17
kwin/effects/thumbnailaside/thumbnailaside_config.h
kwin/effects/thumbnailaside/thumbnailaside_config.h
+15
-15
kwin/effects/trackmouse/trackmouse.cpp
kwin/effects/trackmouse/trackmouse.cpp
+95
-107
kwin/effects/trackmouse/trackmouse.h
kwin/effects/trackmouse/trackmouse.h
+24
-24
kwin/effects/trackmouse/trackmouse_config.cpp
kwin/effects/trackmouse/trackmouse_config.cpp
+66
-69
kwin/effects/trackmouse/trackmouse_config.h
kwin/effects/trackmouse/trackmouse_config.h
+21
-21
kwin/effects/translucency/translucency.cpp
kwin/effects/translucency/translucency.cpp
+104
-129
kwin/effects/translucency/translucency.h
kwin/effects/translucency/translucency.h
+27
-27
kwin/effects/translucency/translucency_config.cpp
kwin/effects/translucency/translucency_config.cpp
+45
-45
kwin/effects/translucency/translucency_config.h
kwin/effects/translucency/translucency_config.h
+11
-11
kwin/effects/windowgeometry/windowgeometry.cpp
kwin/effects/windowgeometry/windowgeometry.cpp
+73
-80
kwin/effects/windowgeometry/windowgeometry.h
kwin/effects/windowgeometry/windowgeometry.h
+6
-4
kwin/effects/windowgeometry/windowgeometry_config.cpp
kwin/effects/windowgeometry/windowgeometry_config.cpp
+22
-22
No files found.
Too many changes to show.
To preserve performance only
190 of 190+
files are displayed.
Plain diff
Email patch
kwin/activation.cpp
View file @
4fd08556
...
...
@@ -224,54 +224,53 @@ namespace KWin
activeClient(). And of course, to propagate the active client to the
world.
*/
void
Workspace
::
setActiveClient
(
Client
*
c
,
allowed_t
)
{
if
(
active_client
==
c
)
void
Workspace
::
setActiveClient
(
Client
*
c
,
allowed_t
)
{
if
(
active_client
==
c
)
return
;
if
(
c
!=
0
)
{
emit
clientActivated
(
c
);
c
->
sl_activated
();
if
(
c
!=
0
)
{
emit
clientActivated
(
c
);
c
->
sl_activated
();
}
if
(
active_popup
&&
active_popup_client
!=
c
&&
set_active_client_recursion
==
0
)
if
(
active_popup
&&
active_popup_client
!=
c
&&
set_active_client_recursion
==
0
)
closeActivePopup
();
StackingUpdatesBlocker
blocker
(
this
);
StackingUpdatesBlocker
blocker
(
this
);
++
set_active_client_recursion
;
updateFocusMousePosition
(
cursorPos
());
if
(
active_client
!=
NULL
)
{
// note that this may call setActiveClient( NULL ), therefore the recursion counter
active_client
->
setActive
(
false
);
}
updateFocusMousePosition
(
cursorPos
());
if
(
active_client
!=
NULL
)
{
// note that this may call setActiveClient( NULL ), therefore the recursion counter
active_client
->
setActive
(
false
);
}
active_client
=
c
;
Q_ASSERT
(
c
==
NULL
||
c
->
isActive
());
if
(
active_client
!=
NULL
)
Q_ASSERT
(
c
==
NULL
||
c
->
isActive
());
if
(
active_client
!=
NULL
)
last_active_client
=
active_client
;
if
(
active_client
)
{
updateFocusChains
(
active_client
,
FocusChainMakeFirst
);
active_client
->
demandAttention
(
false
);
}
if
(
active_client
)
{
updateFocusChains
(
active_client
,
FocusChainMakeFirst
);
active_client
->
demandAttention
(
false
);
}
pending_take_activity
=
NULL
;
updateCurrentTopMenu
();
updateToolWindows
(
false
);
if
(
c
)
disableGlobalShortcutsForClient
(
c
->
rules
()
->
checkDisableGlobalShortcuts
(
false
));
updateToolWindows
(
false
);
if
(
c
)
disableGlobalShortcutsForClient
(
c
->
rules
()
->
checkDisableGlobalShortcuts
(
false
));
else
disableGlobalShortcutsForClient
(
false
);
disableGlobalShortcutsForClient
(
false
);
updateStackingOrder
();
// e.g. fullscreens have different layer when active/not-active
rootInfo
->
setActiveWindow
(
active_client
?
active_client
->
window
()
:
0
);
rootInfo
->
setActiveWindow
(
active_client
?
active_client
->
window
()
:
0
);
updateColormap
();
if
(
effects
)
static_cast
<
EffectsHandlerImpl
*>
(
effects
)
->
windowActivated
(
active_client
?
active_client
->
effectWindow
()
:
NULL
);
if
(
effects
)
static_cast
<
EffectsHandlerImpl
*>
(
effects
)
->
windowActivated
(
active_client
?
active_client
->
effectWindow
()
:
NULL
);
if
(
tilingEnabled
()
)
notifyTilingWindowActivated
(
active_client
);
if
(
tilingEnabled
()
)
notifyTilingWindowActivated
(
active_client
);
--
set_active_client_recursion
;
}
}
/*!
Tries to activate the client \a c. This function performs what you
...
...
@@ -284,34 +283,31 @@ void Workspace::setActiveClient( Client* c, allowed_t )
\sa stActiveClient(), requestFocus()
*/
void
Workspace
::
activateClient
(
Client
*
c
,
bool
force
)
{
if
(
c
==
NULL
)
{
void
Workspace
::
activateClient
(
Client
*
c
,
bool
force
)
{
if
(
c
==
NULL
)
{
focusToNull
();
setActiveClient
(
NULL
,
Allowed
);
setActiveClient
(
NULL
,
Allowed
);
return
;
}
raiseClient
(
c
);
if
(
!
c
->
isOnCurrentDesktop
()
)
{
}
raiseClient
(
c
);
if
(
!
c
->
isOnCurrentDesktop
())
{
++
block_focus
;
setCurrentDesktop
(
c
->
desktop
()
);
setCurrentDesktop
(
c
->
desktop
()
);
--
block_focus
;
}
if
(
!
c
->
isOnCurrentActivity
()
)
{
}
if
(
!
c
->
isOnCurrentActivity
())
{
++
block_focus
;
//DBUS!
activityController_
.
setCurrentActivity
(
c
->
activities
().
first
()
);
//first isn't necessarily best, but it's easiest
activityController_
.
setCurrentActivity
(
c
->
activities
().
first
());
//first isn't necessarily best, but it's easiest
--
block_focus
;
}
if
(
c
->
isMinimized
())
}
if
(
c
->
isMinimized
())
c
->
unminimize
();
// TODO force should perhaps allow this only if the window already contains the mouse
if
(
options
->
focusPolicyIsReasonable
()
||
force
)
requestFocus
(
c
,
force
);
if
(
options
->
focusPolicyIsReasonable
()
||
force
)
requestFocus
(
c
,
force
);
// Don't update user time for clients that have focus stealing workaround.
// As they usually belong to the current active window but fail to provide
...
...
@@ -320,9 +316,9 @@ void Workspace::activateClient( Client* c, bool force )
// E.g. typing URL in minicli which will show kio_uiserver dialog (with workaround),
// and then kdesktop shows dialog about SSL certificate.
// This needs also avoiding user creation time in Client::readUserTimeMapTimestamp().
if
(
!
c
->
ignoreFocusStealing
())
if
(
!
c
->
ignoreFocusStealing
())
c
->
updateUserTime
();
}
}
/*!
Tries to activate the client by asking X for the input focus. This
...
...
@@ -331,80 +327,73 @@ void Workspace::activateClient( Client* c, bool force )
\sa Workspace::activateClient()
*/
void
Workspace
::
requestFocus
(
Client
*
c
,
bool
force
)
{
takeActivity
(
c
,
ActivityFocus
|
(
force
?
ActivityFocusForce
:
0
),
false
);
}
void
Workspace
::
takeActivity
(
Client
*
c
,
int
flags
,
bool
handled
)
{
// the 'if
( c == active_client ) return;' optimization mustn't be done here
if
(
!
focusChangeEnabled
()
&&
(
c
!=
active_client
)
)
void
Workspace
::
requestFocus
(
Client
*
c
,
bool
force
)
{
takeActivity
(
c
,
ActivityFocus
|
(
force
?
ActivityFocusForce
:
0
),
false
);
}
void
Workspace
::
takeActivity
(
Client
*
c
,
int
flags
,
bool
handled
)
{
// the 'if
( c == active_client ) return;' optimization mustn't be done here
if
(
!
focusChangeEnabled
()
&&
(
c
!=
active_client
)
)
flags
&=
~
ActivityFocus
;
if
(
!
c
)
{
if
(
!
c
)
{
focusToNull
();
return
;
}
}
if
(
flags
&
ActivityFocus
)
{
if
(
flags
&
ActivityFocus
)
{
Client
*
modal
=
c
->
findModal
();
if
(
modal
!=
NULL
&&
modal
!=
c
)
{
if
(
!
modal
->
isOnDesktop
(
c
->
desktop
()))
{
modal
->
setDesktop
(
c
->
desktop
());
if
(
modal
->
desktop
()
!=
c
->
desktop
())
// forced desktop
activateClient
(
modal
);
}
if
(
modal
!=
NULL
&&
modal
!=
c
)
{
if
(
!
modal
->
isOnDesktop
(
c
->
desktop
()))
{
modal
->
setDesktop
(
c
->
desktop
());
if
(
modal
->
desktop
()
!=
c
->
desktop
())
// forced desktop
activateClient
(
modal
);
}
// if the click was inside the window (i.e. handled is set),
// but it has a modal, there's no need to use handled mode, because
// the modal doesn't get the click anyway
// raising of the original window needs to be still done
if
(
flags
&
ActivityRaise
)
raiseClient
(
c
);
if
(
flags
&
ActivityRaise
)
raiseClient
(
c
);
c
=
modal
;
handled
=
false
;
}
cancelDelayFocus
();
}
if
(
!
(
flags
&
ActivityFocusForce
)
&&
(
c
->
isTopMenu
()
||
c
->
isDock
()
||
c
->
isSplash
())
)
cancelDelayFocus
();
}
if
(
!
(
flags
&
ActivityFocusForce
)
&&
(
c
->
isTopMenu
()
||
c
->
isDock
()
||
c
->
isSplash
()))
flags
&=
~
ActivityFocus
;
// toplevel menus and dock windows don't take focus if not forced
if
(
c
->
isShade
())
{
if
(
c
->
wantsInput
()
&&
(
flags
&
ActivityFocus
))
{
// client cannot accept focus, but at least the window should be active (window menu, et. al. )
c
->
setActive
(
true
);
if
(
c
->
isShade
())
{
if
(
c
->
wantsInput
()
&&
(
flags
&
ActivityFocus
))
{
// client cannot accept focus, but at least the window should be active (window menu, et. al. )
c
->
setActive
(
true
);
focusToNull
();
}
}
flags
&=
~
ActivityFocus
;
handled
=
false
;
// no point, can't get clicks
}
if
(
c
->
clientGroup
()
&&
c
->
clientGroup
()
->
visible
()
!=
c
)
c
->
clientGroup
()
->
setVisible
(
c
);
if
(
!
c
->
isShown
(
true
))
// shouldn't happen, call activateClient() if needed
{
kWarning
(
1212
)
<<
"takeActivity: not shown"
;
}
if
(
c
->
clientGroup
()
&&
c
->
clientGroup
()
->
visible
()
!=
c
)
c
->
clientGroup
()
->
setVisible
(
c
);
if
(
!
c
->
isShown
(
true
))
{
// shouldn't happen, call activateClient() if needed
kWarning
(
1212
)
<<
"takeActivity: not shown"
;
return
;
}
c
->
takeActivity
(
flags
,
handled
,
Allowed
);
if
(
!
c
->
isOnScreen
(
active_screen
))
active_screen
=
c
->
screen
();
}
c
->
takeActivity
(
flags
,
handled
,
Allowed
);
if
(
!
c
->
isOnScreen
(
active_screen
))
active_screen
=
c
->
screen
();
}
void
Workspace
::
handleTakeActivity
(
Client
*
c
,
Time
/*timestamp*/
,
int
flags
)
{
if
(
pending_take_activity
!=
c
)
// pending_take_activity is reset when doing restack or activation
void
Workspace
::
handleTakeActivity
(
Client
*
c
,
Time
/*timestamp*/
,
int
flags
)
{
if
(
pending_take_activity
!=
c
)
// pending_take_activity is reset when doing restack or activation
return
;
if
((
flags
&
ActivityRaise
)
!=
0
)
raiseClient
(
c
);
if
((
flags
&
ActivityFocus
)
!=
0
&&
c
->
isShown
(
false
))
c
->
takeFocus
(
Allowed
);
if
((
flags
&
ActivityRaise
)
!=
0
)
raiseClient
(
c
);
if
((
flags
&
ActivityFocus
)
!=
0
&&
c
->
isShown
(
false
))
c
->
takeFocus
(
Allowed
);
pending_take_activity
=
NULL
;
}
}
/*!
Informs the workspace that the client \a c has been hidden. If it
...
...
@@ -413,126 +402,116 @@ void Workspace::handleTakeActivity( Client* c, Time /*timestamp*/, int flags )
\a c may already be destroyed
*/
void
Workspace
::
clientHidden
(
Client
*
c
)
{
assert
(
!
c
->
isShown
(
true
)
||
!
c
->
isOnCurrentDesktop
()
||
!
c
->
isOnCurrentActivity
());
activateNextClient
(
c
);
}
void
Workspace
::
clientHidden
(
Client
*
c
)
{
assert
(
!
c
->
isShown
(
true
)
||
!
c
->
isOnCurrentDesktop
()
||
!
c
->
isOnCurrentActivity
());
activateNextClient
(
c
);
}
static
inline
bool
isUsableFocusCandidate
(
Client
*
c
,
Client
*
prev
,
bool
respectScreen
)
{
static
inline
bool
isUsableFocusCandidate
(
Client
*
c
,
Client
*
prev
,
bool
respectScreen
)
{
return
c
!=
prev
&&
c
->
isShown
(
false
)
&&
c
->
isOnCurrentDesktop
()
&&
c
->
isOnCurrentActivity
()
&&
(
!
respectScreen
||
c
->
isOnScreen
(
prev
?
prev
->
screen
()
:
Workspace
::
self
()
->
activeScreen
()
)
);
}
c
->
isShown
(
false
)
&&
c
->
isOnCurrentDesktop
()
&&
c
->
isOnCurrentActivity
()
&&
(
!
respectScreen
||
c
->
isOnScreen
(
prev
?
prev
->
screen
()
:
Workspace
::
self
()
->
activeScreen
())
);
}
// deactivates 'c' and activates next client
bool
Workspace
::
activateNextClient
(
Client
*
c
)
{
bool
Workspace
::
activateNextClient
(
Client
*
c
)
{
// if 'c' is not the active or the to-become active one, do nothing
if
(
!
(
c
==
active_client
||
(
should_get_focus
.
count
()
>
0
&&
c
==
should_get_focus
.
last
())))
if
(
!
(
c
==
active_client
||
(
should_get_focus
.
count
()
>
0
&&
c
==
should_get_focus
.
last
())))
return
false
;
closeActivePopup
();
if
(
c
!=
NULL
)
{
if
(
c
==
active_client
)
setActiveClient
(
NULL
,
Allowed
);
should_get_focus
.
removeAll
(
c
);
}
if
(
focusChangeEnabled
())
{
if
(
options
->
focusPolicyIsReasonable
())
{
// search the focus_chain for a client to transfer focus to,
if
(
c
!=
NULL
)
{
if
(
c
==
active_client
)
setActiveClient
(
NULL
,
Allowed
);
should_get_focus
.
removeAll
(
c
);
}
if
(
focusChangeEnabled
())
{
if
(
options
->
focusPolicyIsReasonable
())
{
// search the focus_chain for a client to transfer focus to,
Client
*
get_focus
=
NULL
;
// first try to pass the focus to the (former) active clients leader
if
(
c
&&
(
get_focus
=
c
->
transientFor
()
)
&&
isUsableFocusCandidate
(
get_focus
,
c
,
options
->
separateScreenFocus
))
{
raiseClient
(
get_focus
);
// also raise - we don't know where it came from
}
else
// nope, ask the focus chain for the next candidate
{
if
(
c
&&
(
get_focus
=
c
->
transientFor
())
&&
isUsableFocusCandidate
(
get_focus
,
c
,
options
->
separateScreenFocus
))
{
raiseClient
(
get_focus
);
// also raise - we don't know where it came from
}
else
{
// nope, ask the focus chain for the next candidate
get_focus
=
NULL
;
// reset
for
(
int
i
=
focus_chain
[
currentDesktop
()
].
size
()
-
1
;
i
>=
0
;
--
i
)
{
Client
*
ci
=
focus_chain
[
currentDesktop
()
].
at
(
i
);
if
(
isUsableFocusCandidate
(
ci
,
c
,
options
->
separateScreenFocus
))
{
for
(
int
i
=
focus_chain
[
currentDesktop
()].
size
()
-
1
;
i
>=
0
;
--
i
)
{
Client
*
ci
=
focus_chain
[
currentDesktop
()].
at
(
i
);
if
(
isUsableFocusCandidate
(
ci
,
c
,
options
->
separateScreenFocus
))
{
get_focus
=
ci
;
break
;
// we're done
}
}
}
}
if
(
get_focus
==
NULL
)
// last chance: focus the desktop
get_focus
=
findDesktop
(
true
,
currentDesktop
());
if
(
get_focus
==
NULL
)
// last chance: focus the desktop
get_focus
=
findDesktop
(
true
,
currentDesktop
());
if
(
get_focus
!=
NULL
)
requestFocus
(
get_focus
);
if
(
get_focus
!=
NULL
)
requestFocus
(
get_focus
);
else
focusToNull
();
}
else
return
false
;
}
else
}
else
return
false
;
}
else
// if blocking focus, move focus to the desktop later if needed
// in order to avoid flickering
focusToNull
();
return
true
;
}
}
void
Workspace
::
setCurrentScreen
(
int
new_screen
)
{
void
Workspace
::
setCurrentScreen
(
int
new_screen
)
{
if
(
new_screen
<
0
||
new_screen
>
numScreens
())
return
;
if
(
!
options
->
focusPolicyIsReasonable
())
if
(
!
options
->
focusPolicyIsReasonable
())
return
;
closeActivePopup
();
Client
*
get_focus
=
NULL
;
for
(
int
i
=
focus_chain
[
currentDesktop
()
].
count
()
-
1
;
i
>=
0
;
--
i
)
{
Client
*
ci
=
focus_chain
[
currentDesktop
()
].
at
(
i
);
if
(
!
ci
->
isShown
(
false
)
||
!
ci
->
isOnCurrentDesktop
()
||
!
ci
->
isOnCurrentActivity
())
for
(
int
i
=
focus_chain
[
currentDesktop
()].
count
()
-
1
;
i
>=
0
;
--
i
)
{
Client
*
ci
=
focus_chain
[
currentDesktop
()].
at
(
i
);
if
(
!
ci
->
isShown
(
false
)
||
!
ci
->
isOnCurrentDesktop
()
||
!
ci
->
isOnCurrentActivity
())
continue
;
if
(
!
ci
->
screen
()
==
new_screen
)
if
(
!
ci
->
screen
()
==
new_screen
)
continue
;
get_focus
=
ci
;
break
;
}
if
(
get_focus
==
NULL
)
get_focus
=
findDesktop
(
true
,
currentDesktop
());
if
(
get_focus
!=
NULL
&&
get_focus
!=
mostRecentlyActivatedClient
())
requestFocus
(
get_focus
);
active_screen
=
new_screen
;
}
if
(
get_focus
==
NULL
)
get_focus
=
findDesktop
(
true
,
currentDesktop
());
if
(
get_focus
!=
NULL
&&
get_focus
!=
mostRecentlyActivatedClient
())
requestFocus
(
get_focus
);
active_screen
=
new_screen
;
}
void
Workspace
::
gotFocusIn
(
const
Client
*
c
)
{
if
(
should_get_focus
.
contains
(
const_cast
<
Client
*
>
(
c
)))
{
// remove also all sooner elements that should have got FocusIn,
// but didn't for some reason (and also won't anymore, because they were sooner)
while
(
should_get_focus
.
first
()
!=
c
)
void
Workspace
::
gotFocusIn
(
const
Client
*
c
)
{
if
(
should_get_focus
.
contains
(
const_cast
<
Client
*
>
(
c
)))
{
// remove also all sooner elements that should have got FocusIn,
// but didn't for some reason (and also won't anymore, because they were sooner)
while
(
should_get_focus
.
first
()
!=
c
)
should_get_focus
.
pop_front
();
should_get_focus
.
pop_front
();
// remove 'c'
}
}
}
void
Workspace
::
setShouldGetFocus
(
Client
*
c
)
{
should_get_focus
.
append
(
c
);
void
Workspace
::
setShouldGetFocus
(
Client
*
c
)
{
should_get_focus
.
append
(
c
);
updateStackingOrder
();
// e.g. fullscreens have different layer when active/not-active
}
}
// focus_in -> the window got FocusIn event
// ignore_desktop - call comes from _NET_ACTIVE_WINDOW message, don't refuse just because of window
// is on a different desktop
bool
Workspace
::
allowClientActivation
(
const
Client
*
c
,
Time
time
,
bool
focus_in
,
bool
ignore_desktop
)
{
bool
Workspace
::
allowClientActivation
(
const
Client
*
c
,
Time
time
,
bool
focus_in
,
bool
ignore_desktop
)
{
// options->focusStealingPreventionLevel :
// 0 - none - old KWin behaviour, new windows always get focus
// 1 - low - focus stealing prevention is applied normally, when unsure, activation is allowed
...
...
@@ -541,150 +520,139 @@ bool Workspace::allowClientActivation( const Client* c, Time time, bool focus_in
// 3 - high - new window gets focus only if it belongs to the active application,
// or when no window is currently active
// 4 - extreme - no window gets focus without user intervention
if
(
time
==
-
1U
)
if
(
time
==
-
1U
)
time
=
c
->
userTime
();
int
level
=
c
->
rules
()
->
checkFSP
(
options
->
focusStealingPreventionLevel
);
if
(
session_saving
&&
level
<=
2
)
// <= normal
{
int
level
=
c
->
rules
()
->
checkFSP
(
options
->
focusStealingPreventionLevel
);
if
(
session_saving
&&
level
<=
2
)
{
// <= normal
return
true
;
}
}
Client
*
ac
=
mostRecentlyActivatedClient
();
if
(
focus_in
)
{
if
(
should_get_focus
.
contains
(
const_cast
<
Client
*
>
(
c
)))
if
(
focus_in
)
{
if
(
should_get_focus
.
contains
(
const_cast
<
Client
*
>
(
c
)))
return
true
;
// FocusIn was result of KWin's action
// Before getting FocusIn, the active Client already
// got FocusOut, and therefore got deactivated.
ac
=
last_active_client
;
}
if
(
time
==
0
)
// explicitly asked not to get focus
}
if
(
time
==
0
)
// explicitly asked not to get focus
return
false
;
if
(
level
==
0
)
// none
if
(
level
==
0
)
// none
return
true
;
if
(
level
==
4
)
// extreme
if
(
level
==
4
)
// extreme
return
false
;
if
(
!
ignore_desktop
&&
!
c
->
isOnCurrentDesktop
())
if
(
!
ignore_desktop
&&
!
c
->
isOnCurrentDesktop
())
return
false
;
// allow only with level == 0
if
(
c
->
ignoreFocusStealing
())
if
(
c
->
ignoreFocusStealing
())
return
true
;
if
(
ac
==
NULL
||
ac
->
isDesktop
())
{
kDebug
(
1212
)
<<
"Activation: No client active, allowing"
;
if
(
ac
==
NULL
||
ac
->
isDesktop
())
{
kDebug
(
1212
)
<<
"Activation: No client active, allowing"
;
return
true
;
// no active client -> always allow
}
}
// TODO window urgency -> return true?
if
(
Client
::
belongToSameApplication
(
c
,
ac
,
true
))
{
kDebug
(
1212
)
<<
"Activation: Belongs to active application"
;
if
(
Client
::
belongToSameApplication
(
c
,
ac
,
true
))
{
kDebug
(
1212
)
<<
"Activation: Belongs to active application"
;
return
true
;
}
if
(
level
==
3
)
// high
}
if
(
level
==
3
)
// high
return
false
;
if
(
time
==
-
1U
)
// no time known
{
kDebug
(
1212
)
<<
"Activation: No timestamp at all"
;
if
(
level
==
1
)
// low
if
(
time
==
-
1U
)
{
// no time known
kDebug
(
1212
)
<<
"Activation: No timestamp at all"
;
if
(
level
==
1
)
// low
return
true
;
// no timestamp at all, don't activate - because there's also creation timestamp
// done on CreateNotify, this case should happen only in case application