Go to file
Eike Hein 433b6794fe Add Qt::Dialog to default flags to make QXcbWindow::isTransient() happy.
Panel popup dialogs along with other applications of Plasma::Dialog
(e.g. Kicker's submenus) currently don't correctly set WM_TRANSIENT_FOR
to the id of their parent window on X11. This causes them to interact
badly with auto-hide panels which do not set struts, e.g. Kicker's
submenus open behind the panel.

Internally, Dialog makes calls to QWindow::setFlags when its window
type is "Normal" (the default) and otherwise uses KWindowSystem's
setType. (Kicker's subclass, SubMenu, does an additional
KWindowSystem::setType call for NET::Menu). Neither CompactApplet
nor Kicker change their Dialog's 'type' property to anything else,
so their dialogs are "Normal", thus going the setFlags route with
no setType calls.

Dialog also sets its transient parent to the window the visualParent
item is inside of.

Now here is where things break down: QXcbWindow will update
WM_TRANSIENT_PARENT for in show(), but only when an inline function
called isTransient returns true. isTransient decides this based on
window type, which is determined from the flags set with
QWindow::setFlags. Calls to KWindowSystem::setType would have no
bearing on this; there seems to be no mapping back from external
state. This is why setting Dialog.type to e.g. "DialogWindow" does
nothing.

This patch takes the route of adding Qt::Dialog to the starting
flags - after all Dialog is a dialog. That means isTransient()
will consider the window to be a transient and those
setTransientParent calls Dialog does will not be ignored. In the
case of CompactApplet, no further calls to KWS::setType are done;
Kicker continues to call it with NET::Menu to get desired window
manager behavior.

In light testing everything still seems too work, with the added
benefit of fixing:
BUG:366278

That said, the weird mess of setFlags and setType and state in the
windowing system vs. Qt is horrible and sad.

REVIEW:128571
2016-08-02 19:20:33 +09:00
autotests Fix the infamous 'dialogs show up on the Task Manager' bug once more. 2016-07-15 19:40:37 +09:00
docs Rename docs/plasmapkg directory to docs/plasmapkg2 2016-06-13 15:55:56 +02:00
examples SVN_SILENT made messages (.desktop file) - always resolve ours 2016-06-29 09:34:42 +00:00
src Add Qt::Dialog to default flags to make QXcbWindow::isTransient() happy. 2016-08-02 19:20:33 +09:00
templates SVN_SILENT made messages (.desktop file) - always resolve ours 2016-06-29 09:34:42 +00:00
tests plugintest: remove dead code 2016-06-12 15:54:47 +02:00
.reviewboardrc Fix .reviewboardrc syntax 2014-06-02 17:39:23 +01:00
CMakeLists.txt Upgrade KF5 version to 5.25.0. 2016-07-09 10:03:44 +00:00
COPYING Add COPYING and COPYING.LIB files 2013-12-23 18:39:10 +00:00
COPYING.LIB Add COPYING and COPYING.LIB files 2013-12-23 18:39:10 +00:00
KF5PlasmaConfig.cmake.in Add missing dependency in the config file 2016-07-20 14:34:27 +02:00
KF5PlasmaMacros.cmake Remove rather outdated .svn install exclusion 2014-09-25 13:16:28 +02:00
metainfo.yaml Individually specify supported platforms 2016-06-15 17:59:46 +02:00
README.md Add/update first line of README.md to be a short description, useful for inqlude 2015-07-27 19:41:21 +02:00

Plasma Framework

Foundational libraries, components, and tools of the Plasma workspaces

Introduction

The plasma framework provides the following:

  • QML components
  • A C++ library: libplasma
  • Script engines

QML components

org.kde.plasma.core

Bindings for libplasma functionality, such as DataEngine and FrameSvg, see @ref core.

org.kde.plasma.components

Graphical components for common items such as buttons, lineedits, tabbars and so on. Compatible subset of the MeeGo components used on the N9, see @ref plasmacomponents.

org.kde.plasma.extras

Extra graphical components that extend org.kde.plasma.components but are not in the standard api, see @ref plasmaextracomponents.

org.kde.plasma.plasmoid

Attached properties for manipulating the current applet or containment, see @ref libplasmaquick

libplasma

This C++ library provides:

  • rendering of SVG themes
  • loading of files from a certain filesystem structure: packages
  • data access through data engines
  • loading of the plugin structure of the workspace: containments and applets

See @ref libplasma.

Script engines

Provides support to create applets or containments in various scripting languages.