kwin/src
Vlad Zahorodnii 1ff2846579 Remove boolean trap in Workspace::stackBelow()
Boolean traps are a code smell that makes code harder to read and it
also usually makes the api more difficult.

The force == false is used by two places:

 - in Workspace::restackWindowUnderActive()
 - and in X11Window::restackWindow()

Technically, the restackWindow() function doesn't need the force == false
behavior because the stackBelow() function is used in code paths where an
explicit sibling is provided.

The restackWindowUnderActive() function is trickier, it is used in the case
when kwin rejects to raise a newly mapped window, so for that purpose, I
changed the function so it picks the lowest window that belongs to the same
application as m_activeWindow.

The result of this change is that the stackBelow() is simpler and its
behavior is much more predictable, which is important when analyzing the
code that updates the stack.
2024-08-21 12:32:51 +00:00
..
3rdparty 3rdparty: Reformat xcursor.{h,c} 2024-05-24 16:21:36 +00:00
backends backends/drm: implement damage tracking for multi gpu transfers 2024-08-20 13:04:18 +00:00
colors core: add transfer function minimum and maximum luminance values 2024-08-09 15:10:45 +02:00
core core/colorpipeline: improve optimization with differing reference luminances 2024-08-19 16:39:11 +02:00
decorations decorations: Show tooltip at current cursor position 2024-08-20 20:54:53 +00:00
effect effect/animationeffect: use a normal d pointer 2024-08-19 11:58:22 +00:00
helpers Generate wayland code with PRIVATE_CODE 2024-08-15 14:16:11 +00:00
kcms kcms: Use flat QGroupBoxes and set documentMode on QTabWidgets 2024-08-13 18:04:14 +00:00
opengl opengl: Drop GLTexture::clear() 2024-08-20 22:38:13 +00:00
platformsupport opengl: Add GLTexture::update() overload that takes a region 2024-08-16 19:03:40 +03:00
plugins SVN_SILENT made messages (.desktop file) - always resolve ours 2024-08-20 01:24:48 +00:00
qml Round all the things consistently 2024-04-08 16:56:50 +00:00
scene scene: Ignore xwayland window shape 2024-08-21 07:10:42 +00:00
scripting scene/item: add ItemEffect 2024-08-12 12:13:31 +00:00
tabbox Remove boolean trap in Workspace::stackBelow() 2024-08-21 12:32:51 +00:00
tiles quicktiling: Reset layout when last quicktile ceases to exist 2024-07-01 07:53:06 +00:00
utils placeholderinputeventfilter: don't block media keys 2024-08-12 13:44:03 +00:00
wayland wayland: Allow mapping more than one shm buffer at the same time 2024-08-20 22:32:38 +03:00
xwayland xwayland: Drop outdated guard against clipboard races 2024-08-10 21:53:04 +00:00
activation.cpp activation: fix X11 windows being stuck in should_get_focus more properly 2024-08-05 23:25:53 +02:00
activities.cpp Rename Workspace::updateClientArea as Workspace::rearrange 2024-03-07 13:41:02 +02:00
activities.h Remove unneeded includes from headers and cpp files 2024-01-13 11:34:45 +01:00
appmenu.cpp Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
appmenu.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
atoms.cpp
atoms.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
client_machine.cpp Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
client_machine.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
CMakeLists.txt utils: Rename KXcursorTheme to CursorTheme 2024-08-07 11:57:39 +03:00
compositor.cpp compositor: move the composite method into X11 and Wayland implementations 2024-04-29 14:56:20 +02:00
compositor.h compositor: move the composite method into X11 and Wayland implementations 2024-04-29 14:56:20 +02:00
compositor_wayland.cpp backends/drm: test direct scanout with the same code as presentation 2024-08-16 14:26:58 +02:00
compositor_wayland.h compositor: move the composite method into X11 and Wayland implementations 2024-04-29 14:56:20 +02:00
compositor_x11.cpp backends: move output refresh duration to compositor 2024-05-24 17:32:20 +02:00
compositor_x11.h Remove unneeded includes from headers and cpp files 2024-01-13 11:34:45 +01:00
config-kwin.h.cmake wayland: Bump default max buffer size to 1 MiB 2024-06-25 20:19:59 +03:00
cursor.cpp Add CursorSource::frame 2024-07-31 12:15:48 +00:00
cursor.h Add CursorSource::frame 2024-07-31 12:15:48 +00:00
cursorsource.cpp utils: Rename KXcursorTheme to CursorTheme 2024-08-07 11:57:39 +03:00
cursorsource.h utils: Rename KXcursorTheme to CursorTheme 2024-08-07 11:57:39 +03:00
dbusinterface.cpp Do not rely on NETWM for the main Window class 2024-02-20 18:04:06 +00:00
dbusinterface.h
debug_console.cpp debug_console: correct name scancode to keycode 2024-08-19 13:59:17 +00:00
debug_console.h Add effects tab in debug console 2024-06-29 09:40:43 +00:00
debug_console.ui Remove the surfaces tab in the debug console 2024-06-27 20:54:42 +03:00
dpmsinputeventfilter.cpp placeholderinputeventfilter: don't block media keys 2024-08-12 13:44:03 +00:00
dpmsinputeventfilter.h Also wake up screens on tablet interactions 2024-06-14 06:54:42 +00:00
events.cpp x11: Ignore all grab notifications for focus handling 2024-07-30 14:54:16 +00:00
focuschain.cpp Make FocusChain ignore closed windows 2024-06-25 05:23:40 +00:00
focuschain.h
ftrace.cpp
ftrace.h
gestures.cpp
gestures.h
globalshortcuts.cpp Fix !KWIN_BUILD_GLOBALSHORTCUTS builds 2024-06-25 11:21:56 +02:00
globalshortcuts.h Fix !KWIN_BUILD_GLOBALSHORTCUTS builds 2024-06-25 11:21:56 +02:00
group.cpp Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
group.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
hide_cursor_spy.cpp
hide_cursor_spy.h
idle_inhibition.cpp Port away the remaining users of windowShown/windowHidden to hiddenChanged 2024-02-27 20:58:52 +00:00
idle_inhibition.h
idledetector.cpp Port IdleDetector to QBasicTimer 2024-03-08 13:12:09 +02:00
idledetector.h Port IdleDetector to QBasicTimer 2024-03-08 13:12:09 +02:00
input.cpp wayland: Move XWayland key forwarding into a filter 2024-08-02 09:31:40 +00:00
input.h wayland: Move XWayland key forwarding into a filter 2024-08-02 09:31:40 +00:00
input_event.cpp Revert "Handle null input devices in WheelEvent" 2024-07-15 12:55:28 +00:00
input_event.h pointer input: handle warp events differently from absolute motion events 2024-03-19 20:13:11 +01:00
input_event_spy.cpp
input_event_spy.h
inputmethod.cpp plugins/buttonrebinds: correctly handle level 1 keys 2024-08-05 16:37:32 +00:00
inputmethod.h inputmethod: Send pre-defined commit message to client on user interaction 2024-08-02 09:07:46 +00:00
inputpanelv1integration.cpp
inputpanelv1integration.h
inputpanelv1window.cpp inputpanelv1window: polish window states 2024-06-24 12:48:05 +00:00
inputpanelv1window.h inputpanelv1window: polish window states 2024-06-24 12:48:05 +00:00
internalwindow.cpp Make Window::closeWindow() noop if the window is already closed 2024-06-14 11:16:41 +00:00
internalwindow.h Move X11Window::findModal() to Window and remove boolean trap 2024-03-19 12:47:59 +00:00
keyboard_input.cpp tabbox: Reset keyboard focus when grabbing input 2024-08-02 06:10:15 +00:00
keyboard_input.h tabbox: Reset keyboard focus when grabbing input 2024-08-02 06:10:15 +00:00
keyboard_layout.cpp keyboard_layout: always expose dbus interface 2024-03-15 22:21:08 +00:00
keyboard_layout.h Export KeyboardLayout 2024-04-15 13:05:15 +00:00
keyboard_layout_switching.cpp
keyboard_layout_switching.h
keyboard_repeat.cpp
keyboard_repeat.h
killprompt.cpp Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
killprompt.h Support kill prompt for XdgTopLevelWindows 2023-11-27 14:10:15 +00:00
killwindow.cpp
killwindow.h
kscreenintegration.cpp kscreenintegration: fix rotation not being preserved from Plasma 5 2024-02-12 13:38:14 +00:00
kscreenintegration.h
kwin.kcfg Sync xwayland eavesdropping default in kwin.kcfg 2024-06-18 07:39:22 +00:00
kwin.notifyrc SVN_SILENT made messages (.desktop file) - always resolve ours 2024-07-30 01:24:58 +00:00
KWinConfig.cmake.in Add missing find_dependency for epoxy 2024-01-15 18:02:44 +00:00
layers.cpp Remove boolean trap in Workspace::stackBelow() 2024-08-21 12:32:51 +00:00
layershellv1integration.cpp Rename Workspace::updateClientArea as Workspace::rearrange 2024-03-07 13:41:02 +02:00
layershellv1integration.h wayland: Fix windows shrinking when output layout changes 2024-03-07 13:41:01 +02:00
layershellv1window.cpp Make Window::closeWindow() noop if the window is already closed 2024-06-14 11:16:41 +00:00
layershellv1window.h Improve integration of preferred buffer scale with xdg shell configure events 2024-05-23 08:15:29 +00:00
lidswitchtracker.cpp
lidswitchtracker.h
main.cpp main: Allow building without QtX11Info 2024-08-08 12:30:53 +02:00
main.h Drop WaylandServer initialization flags 2024-06-23 17:53:17 +00:00
main_wayland.cpp Initialize KCrash after setting KAboutData 2024-08-07 14:25:52 +02:00
main_wayland.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
main_x11.cpp core: Disable Qt RHI pipeline cache 2024-05-31 15:28:09 +00:00
main_x11.h
Messages.sh
mousebuttons.cpp
mousebuttons.h
moving_client_x11_filter.cpp Port Window::updateInteractiveMoveResize() away from input()->keyboardModifiers() 2024-07-15 15:08:11 +00:00
moving_client_x11_filter.h
netinfo.cpp Fix sending window to all desktops 2024-03-08 08:21:29 +00:00
netinfo.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
onscreennotification.cpp Unify the format for #include "config.h" 2024-02-28 16:03:50 +00:00
onscreennotification.h
options.cpp remove the HideUtilityWindowsForInactive option 2024-06-07 21:14:41 +02:00
options.h remove the HideUtilityWindowsForInactive option 2024-06-07 21:14:41 +02:00
org.freedesktop.DBus.Properties.xml
org.kde.kappmenu.xml
org.kde.kwin.Compositing.xml
org.kde.kwin.Effects.xml
org.kde.KWin.Plugins.xml
org.kde.KWin.Session.xml Expose a method to allow closing windows on shutdown. 2023-11-20 14:56:17 +00:00
org.kde.KWin.VirtualDesktopManager.xml
org.kde.KWin.xml
osd.cpp
osd.h
outline.cpp
outline.h
outputconfigurationstore.cpp Loosen minimum screen size detection code for output scale calculation 2024-07-30 03:16:01 +00:00
outputconfigurationstore.h color management: change brightness information names to be shorter and more correct 2024-06-28 13:16:02 +00:00
placeholderinputeventfilter.cpp placeholderinputeventfilter: don't block media keys 2024-08-12 13:44:03 +00:00
placeholderinputeventfilter.h core: Introduce explicit weight to InputEventFilter 2024-08-01 08:46:06 +00:00
placeholderoutput.cpp Disable placeholder output when removing it 2024-03-21 12:19:20 +02:00
placeholderoutput.h
placement.cpp window: make setQuickTileMode more sane 2024-08-14 11:38:07 +00:00
placement.h
placementtracker.cpp window: make setQuickTileMode more sane 2024-08-14 11:38:07 +00:00
placementtracker.h placementtracker: save geometry restores more explicitly 2024-02-19 17:18:28 +01:00
plugin.cpp
plugin.h Unify the format for #include "config.h" 2024-02-28 16:03:50 +00:00
pluginmanager.cpp
pluginmanager.h
pointer_input.cpp utils: Rename KXcursorTheme to CursorTheme 2024-08-07 11:57:39 +03:00
pointer_input.h utils: Rename KXcursorTheme to CursorTheme 2024-08-07 11:57:39 +03:00
popup_input_filter.cpp core: Introduce explicit weight to InputEventFilter 2024-08-01 08:46:06 +00:00
popup_input_filter.h
resources.qrc plugins/invert: support color management 2023-12-11 22:46:27 +01:00
rootinfo_filter.cpp Ignore external updates of _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES 2024-01-30 14:14:09 +02:00
rootinfo_filter.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
rulebooksettings.cpp rules/RuleBook: Optimize saving discarded rules to config 2024-05-13 20:18:09 +02:00
rulebooksettings.h rules/RuleBook: Optimize saving discarded rules to config 2024-05-13 20:18:09 +02:00
rulebooksettingsbase.kcfg
rulebooksettingsbase.kcfgc
rules.cpp rules/RuleBook: Optimize saving discarded rules to config 2024-05-13 20:18:09 +02:00
rules.h rules/RuleBook: Optimize saving discarded rules to config 2024-05-13 20:18:09 +02:00
rulesettings.kcfg Add Adaptive Sync window rule 2024-02-12 12:05:52 +00:00
rulesettings.kcfgc
screenedge.cpp screenedge: allow activating clients in drag and drop 2024-08-07 16:29:55 +00:00
screenedge.h pointer_input: implement edge barrier between screens 2024-03-08 12:03:28 -08:00
screenlockerwatcher.cpp Drop WaylandServer initialization flags 2024-06-23 17:53:17 +00:00
screenlockerwatcher.h
settings.kcfgc
shadow.cpp Fix checking whether GraphicsBufferView is null 2024-07-30 14:02:16 +00:00
shadow.h
shortcutdialog.ui
sm.cpp Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
sm.h Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
syncalarmx11filter.cpp
syncalarmx11filter.h
tablet_input.cpp workspace: unify active screen modes 2024-04-29 14:13:32 +00:00
tablet_input.h
tabletmodemanager.cpp Port away from deprecated KConfigBase::group() api 2023-11-28 10:02:03 +00:00
tabletmodemanager.h Unify the format for #include "config.h" 2024-02-28 16:03:50 +00:00
touch_input.cpp Drop WaylandServer initialization flags 2024-06-23 17:53:17 +00:00
touch_input.h
useractions.cpp Prefer en_US, "centre" -> "center" 2024-06-17 05:29:59 +00:00
useractions.h
virtualdesktops.cpp Make it possible to build KWin without libxcb 2024-02-28 16:03:50 +00:00
virtualdesktops.h virtualdesktops: improve readability 2024-06-29 09:52:36 +00:00
virtualdesktopsdbustypes.cpp
virtualdesktopsdbustypes.h
virtualkeyboard_dbus.cpp
virtualkeyboard_dbus.h
was_user_interaction_x11_filter.cpp
was_user_interaction_x11_filter.h
watchdog.cpp watchdog: add includes for geteuid 2024-06-02 00:25:26 +01:00
wayland_server.cpp wayland_server: expose xx color management support by default 2024-08-15 14:47:21 +00:00
wayland_server.h wayland: implement the alpha-modifier protocol 2024-08-14 14:26:33 +02:00
waylandshellintegration.cpp
waylandshellintegration.h
waylandwindow.cpp Improve integration of preferred buffer scale with xdg shell configure events 2024-05-23 08:15:29 +00:00
waylandwindow.h Move X11Window::findModal() to Window and remove boolean trap 2024-03-19 12:47:59 +00:00
window.cpp Simplify Window::updateLayer() 2024-08-15 09:29:24 +00:00
window.h window: make setQuickTileMode more sane 2024-08-14 11:38:07 +00:00
window_property_notify_x11_filter.cpp effects.h -> effecthandler.h 2023-11-20 15:47:36 +00:00
window_property_notify_x11_filter.h
workspace.cpp Make Workspace::removeUnmanaged() keep the window in the stack 2024-08-20 12:09:40 +00:00
workspace.h Remove boolean trap in Workspace::stackBelow() 2024-08-21 12:32:51 +00:00
x11eventfilter.cpp
x11eventfilter.h
x11syncmanager.cpp opengl: remove most of glutils 2024-03-08 17:26:54 +00:00
x11syncmanager.h opengl: remove most of glutils 2024-03-08 17:26:54 +00:00
x11window.cpp Remove boolean trap in Workspace::stackBelow() 2024-08-21 12:32:51 +00:00
x11window.h Initialize X11Window::m_client geometry 2024-07-18 12:17:18 +00:00
xdgactivationv1.cpp wayland: Install display.h 2024-01-08 23:06:43 +00:00
xdgactivationv1.h
xdgshellintegration.cpp xdgshell: Use killPingTimeout option 2023-11-27 14:10:15 +00:00
xdgshellintegration.h xdgshell: Use killPingTimeout option 2023-11-27 14:10:15 +00:00
xdgshellwindow.cpp wayland: Make XdgPopupWindow also destroy Window 2024-07-19 20:49:01 +00:00
xdgshellwindow.h Improve integration of preferred buffer scale with xdg shell configure events 2024-05-23 08:15:29 +00:00
xkb.cpp plugins/buttonrebinds: correctly handle level 1 keys 2024-08-05 16:37:32 +00:00
xkb.h xkb: Remove declared but not defined method 2024-08-12 10:52:07 +00:00