Commit graph

8 commits

Author SHA1 Message Date
Martin Gräßlin
56d9f90546 Clean up egl/glx extensions in debug console
Summary:
As there is no difference between egl and glx extensions anymore inside
KWin (both are provided through the OpenGLBackend) there is no need to
have to group boxes and do a manual hide/show based on which platform is
used.

Instead there is now just one group box and it's called "Platform
Extensions".

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3400
2016-11-17 13:44:06 +01:00
Martin Gräßlin
327ccffcf4 Add a keyboard tab to the debug console
Summary:
A little bit debug information about the current keyboard state is
useful. Thus a new tab is added to show information about xkbcommon.

It shows:
* layouts in the keymap
* currently active layout
* supported modifiers in key map
* currently active modifiers in state
* supported leds in key map
* currently active leds in state

Whenever a key is pressed/released the complete ui is updated to reflect
the latest state. That is pressing/releasing a modifier is directly
reflected in the ui.

This UI can extended as needed for further debug information about the
keymap state.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3379
2016-11-16 18:02:40 +01:00
Martin Gräßlin
dad7004dbb Add an OpenGL information tab to Debug Console
Summary:
The new tab shows the information from GLPlatform similar to how it is
shown in the supportInformation. In addition it also lists all available
openGL and EGL/GLX extensions. For that kwinglutils is extended by
functions to return the lists of extensions.

Reviewers: #kwin, #plasma, bshah

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2385
2016-08-10 08:27:36 +02:00
Martin Gräßlin
4d7134f6c7 [libinput] Add a wrapper class Device for a libinput_device
Summary:
The Device class wraps all the information we can get from libinput
about the device, like whether it's a keyboard, pointer, touch, etc.

In addition some more information is queried to figure out how "useful"
a device is. For a keyboard all alphanumeric keys are checked whether
they exist, for a pointer all (normal) buttons are queried.

All the information is exposed as Q_PROPERTY and used by the
DebugConsole. The DebugConsole gained a new tab "Input Devices" which
renders all devices and their properties in a tree view. When plugging
in/out a device, the model gets reset, so it's always up to date.

The new Device class can be used in future to configure the device,
e.g. disable touch pad, set mouse acceleration, etc.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1538
2016-05-06 08:21:49 +02:00
Martin Gräßlin
90b9b08d7a Use a QTabWidget for the different modes in DebugConsole
Summary: Replaces the custom logic to switch between the three modes by tabs.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1271
2016-03-31 09:21:18 +02:00
Martin Gräßlin
3edf5a7b0a Input events mode in debug console
Summary: Inspired by xev a new tool which prints out all input events.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1264
2016-03-30 16:24:55 +02:00
Martin Gräßlin
e62dad48a6 Add a surface tree to DebugConsole
Summary:
While developing support for sub-surfaces it became obvious that there
is a need for visualizing the tree of sub-surfaces.

The surface-tree is a new mode added in the debug console. There are now
two buttons to switch between the default window tree and the surface
tree.

The surface tree is a little bit more basic than the windows tree. The
type of window (whether x11, wayland or internal) is ignored. All windows
build up the top level with the sub surfaces as children.

Each surface is represented by some basic information about it:
* Client (binary path and pid)
* internal surface id

If the surface has a shared memory buffer mapped a scaled down version
is used as the window decoration role.

The model gets reset whenever the tree changes in some way as it's
rather complex to track correctly and well, it's just a debug console.

Currently the tree is not really functional yet as KWin doesn't announce
support for sub-compositor protocol, which is also the reason for lack of
autotests for the model. Will be added once sub-compositor works
properly.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1205
2016-03-23 15:07:12 +01:00
Martin Gräßlin
6a19f50cac Add a debugging console to KWin
Summary:
The idea behind the debugging console is to have a feature comparable
to xprop and xwininfo just for Wayland. We cannot have command line
utils as that violates the security restrictions, thus it needs to be
exposed directly in KWin.

The debugging console is invoked through DBus:
qdbus org.kde.KWin /KWin showDebugConsole

This opens a window with a tree view. The DebugConsoleModel which is
used by the tree view groups all windows into four categories:
* x11 clients (that is Workspace::clientList() and Workspace::desktopList())
* x11 unmanaged (Workspace::unmanagedList())
* wayland shell clients (WaylandServer::clients())
* wayland internal clients (KWin's own QWindows - WaylandServer::internalClients())

Each window is a child to one of the four categories. Each window itself
has all it's QProperties exposed as children.

This allows to properly inspect KWin's internal knowledge for windows and
should make it easier to investigate problems. E.g. what's a window's
geometry, what's it's window type and so on.

The debugging console is intended as a developer tool and not expected to
be used by users. That's why it's invokation is rather hidden. Due to
the fact that it's internal to KWin it results in:
* no window decoration
* stealing keyboard focus
* no way to resize, close, move from KWin side
* rendered above all other windows

There is a dedicated close button to get rid of it again. While the
console is shown it's hardly possible to interact with the system in
a normal way anymore. This is something which might be improved in
future.

At the moment the model is able to update when windows are added/removed,
but not yet when a property changes. Due to the lack of interaction with
the existing system, that's not a high priority at the moment, but can
be added in future.

Reviewers: #plasma

Differential Revision: https://phabricator.kde.org/D1146
2016-03-16 14:30:19 +01:00