Commit Graph

245 Commits (ce674ed509301a6756bc9f1a8e946e9c21c4205d)

Author SHA1 Message Date
Martin Gräßlin 85e3a00f27 [kwin] Fix crash checking in startup
Need to do it before we start to claim the manager selection.
2013-11-13 10:23:45 +01:00
Martin Gräßlin 324aae916a [kwin] Drop testapp for detecting whether direct rendering works on glx
The main purpose of the opengl testapp was to set the environment
variable LIBGL_ALWAYS_INDIRECT if direct rendering is not supported
before glx gets initialized.

With Qt5 we may no longer set this environment variable. QtQuick
requires direct rendering. On IvyBridge QtQuick is crashing if the
variable is set. Thus we are no longer allowed to set it and thus the
complete test becomes pointless.

The test app basically whitelisted most drivers anyway, the only
drivers which were problematic are the proprietary Catalyst drivers.
It that's still a problem we can also disable OpenGL compositing on
those drivers through the recommendation in the GLPlatform.

This also means that the KWIN_DIRECT_GL variable is no longer useful.
2013-11-05 14:48:40 +01:00
Martin Klapetek 2dc5aebcc2 Inform KSplash via DBus about kwin startup
KSplash for PW2 will use DBus for setting stages instead of xatoms, this
ports kwin to send a DBus message to KSplash.

REVIEW: 113524
2013-11-04 11:17:24 +01:00
Martin Gräßlin a360d0b96e [kwin] Call QQuickWindow::setDefaultAlphaBuffer before creating first window
We want to have the QQuickWindows using translucency.
2013-10-25 13:00:50 +02:00
Martin Gräßlin e448a4bfc1 Merge branch 'KDE/4.11'
Conflicts:
	kwin/main.cpp
2013-09-26 07:54:51 +02:00
Thomas Lübking 61f1bcc991 Revert "Add ability to disable multihead support"
The variable is set not from config nor anywhere else when kwin is
started through ksmserver by startkde.

In addition the KGlobal implementation is twisted compared to the kcminit
config behavior (the config value defaults to true, not false - ie. if the
variable isn't set (by kcm init) it's reasonable to assume true either.

Therefore and in alignment with PW/2, the environment is read directly and
on absence resolved to "true".

To control the behavior, please export KDE_MULTIHEAD=true/false before starting KWin
(eg. in /usr/bin/startkde)

This reverts commit ab6d5c048a25bcb2f5bdb822ba3eda64019c61bc.

REVIEW: 112579
CCBUG: 256242
2013-09-26 07:52:47 +02:00
Martin Gräßlin 108252194a Use Xcb::Atom in KWin::Atoms to resolve all atoms
During startup we only create the request, the reply will be fetched
once the atom is needed.

To make proper use of this async behavior the creation of Atoms is
moved directly to the claim of the manager selection, so they can be
fetched while we wait for the previous manager selection to give up
on it.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 64dde54f35 Perform crash count checking before we claimed the manager selection
The crash count checking does not depend on whether or not we will
be able to claim the window manager selection. As claiming the selection
can take up to one second we should try to get as many checks which do
not depend on it out.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 5d6c52e26c Drop initing variable from kwin/main.cpp
It's nowhere read, just set once to true and once to false and by
that rather useless.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 26c0e36400 Do not build KWin::SessionManager for the time being
KSessionManager is deprecated and there is no replacement yet. So
let's get rid of the warnings for now. Needs to be re-added once
there is a working QSessionManager again.
2013-09-09 06:03:35 +02:00
Martin Gräßlin 139201a2e2 KGlobal::config() -> KSharedConfig::openConfig()
KWin Core says good bye to KGlobal. We will not miss the threading
issues.
2013-09-04 16:11:40 +02:00
Martin Gräßlin 57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00
Martin Gräßlin c1d0a32b64 Drop close on exit hack in kwin/main
See http://lists.kde.org/?l=kwin&m=137777699329758&w=2
2013-08-30 07:48:17 +02:00
Martin Gräßlin a536e07488 Use kdeqt5staging for QCommandLineParser
Makes it also compile with not latest Qt.
2013-08-29 16:22:30 +02:00
Martin Gräßlin e62001758f Drop some no longer required includes from main.cpp 2013-08-29 13:59:28 +02:00
Martin Gräßlin 1b30755b32 Use XCB for startup and multi-head check in KWin
Multi-head is somehow tested with Xvfb. At least the fork works and
the display variables are properly adjusted.
2013-08-29 13:59:28 +02:00
Martin Gräßlin 16fdecb495 Do not use KGLobalSettings::isMultiHead
KGlobalSettings is kde4supports, so just check the env variable
directly.
2013-08-29 13:59:28 +02:00
Martin Gräßlin d85802da4e Port send event to splash screen to XCB
Not yet tested.
2013-08-29 13:59:28 +02:00
Martin Gräßlin af2359ef98 Port setInputFocus in KWin::Application dtor to XCB 2013-08-29 10:41:45 +02:00
Martin Gräßlin a2d97fef17 Port KWinSelectionOwner to XCB
One usage of DefaultScreen is still present as QX11Info is not yet
providing the primaryScreen from QXcbConnection.
2013-08-29 10:34:11 +02:00
Martin Gräßlin 1f302b0c4a Drop dependency on kde_file.h in kwin/main.cpp 2013-08-29 10:34:11 +02:00
Martin Gräßlin 0dd7adf5f5 Port KWin::Application to QApplication and QCommandLineParser
Done in one step as it requires changes which are better suited with a
QApplication.

To not need to parte the QCommandLineParser around the needed arguments
are added to the KWin::Application through setters and the crash count
is available through a static getter/setter pair.
2013-08-28 14:13:39 +02:00
Martin Gräßlin 437f762466 Use xcb_atom_t for the Atoms in KWinSelectionOwner 2013-08-28 14:13:39 +02:00
Martin Gräßlin d973194c36 Use an XCB replacement for XSelectInput
Wrapped in xcbutils.

In addition the check whether another WM is running in main.cpp is
improved by doing a checked request and directly checking for the
error. If there is an error, KWin puts out an error message and
quits.
2013-08-19 10:52:22 +02:00
Martin Gräßlin bec5bcd50e Drop XSynchronize from KWin
Doesn't make any sense nowadays where we are mostly on XCB.
2013-08-15 13:25:52 +02:00
Martin Gräßlin fa9f640426 Reorder includes in kwin/main.cpp
Group by vendor - kde - qt - x
2013-08-15 13:17:29 +02:00
Martin Gräßlin d01ec8c0ff Remove not needed includes from kwin/main.cpp 2013-08-15 13:09:28 +02:00
Martin Gräßlin 87f362c953 Do not delete effects pointer from KWin::Application dtor
Not needed as the Compositor already deletes the effects pointer.
2013-08-15 13:08:49 +02:00
Martin Gräßlin 3cb4e0322f AlternativeWMDialog ported to QDialog 2013-08-15 12:54:32 +02:00
Anselmo L. S. Melo c9b079e628 Porting kwin main, data and compositingprefs to Qt5/KF5: QStandardPaths
REVIEW: 111971
2013-08-13 17:53:39 -03:00
Martin Gräßlin 9291b18cee Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-08-07 10:10:06 +02:00
Martin Gräßlin 5d0433f20b Drop some no longer needed includes
Less warnings
2013-08-06 11:38:52 +02:00
Martin Gräßlin bd18adcbee kdefakes.h got removed 2013-08-05 11:02:11 +02:00
Martin Gräßlin 65f6db4312 Do an XSync before trying to claim the manager selection
I was getting weird crashes inside the QPA without it.
2013-08-02 08:29:15 +02:00
Martin Gräßlin d164e16b56 Use own Xcb::sync() method in main.cpp
QApplication::syncX() is a no-op in Qt 5 so we need a replacement.
2013-07-31 07:28:15 +02:00
Martin Gräßlin 8da23f76d3 Delay startup till the manager selection is claimed
Moving all the startup code into closure connected to the
claimedOwnership signal.
2013-07-31 07:28:15 +02:00
Martin Gräßlin 03432b5618 Drop the X11ErrorHandler from KWin
The XLib error handler became a little bit useless and we don't get
access to the XCB errors, which get logged as debug messages by Qt.
2013-07-31 07:28:15 +02:00
Martin Gräßlin f11e3283d7 Introduce an XcbEventFilter and install it in the Application
Forwards all xcb events to Workspace::workspaceEvent() which got changed
to process xcb events instead of XEvents. So far all handling is
disabled. Will be re-enabled step by step in the following patches.
2013-07-29 08:58:05 +02:00
Martin Gräßlin 053841f87f KManagerSelection::claim() emits signal in case it fails
We need to connect to this signal instead of waiting for it to time out.
This means we are already starting the window manager while it might be
that we fail.
2013-07-24 09:58:41 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Martin Gräßlin d45d900dc5 Fix includes in main.cpp 2013-07-24 09:47:04 +02:00
Martin Gräßlin 7bd76ca360 KAboutData -> K4AboutData for porting 2013-07-24 09:47:04 +02:00
Martin Gräßlin ea5c23d530 Adjust methods in KWinSelectionOwner to changes in KF5 2013-07-24 09:47:03 +02:00
Martin Gräßlin 4425fd3de9 insertCatalog() needs porting 2013-07-24 09:47:03 +02:00
Martin Gräßlin c2afbcbd87 Disable the x11ErrorHandler for the porting 2013-07-24 09:47:03 +02:00
Martin Gräßlin a516cf3c11 Drop KWinApplication::x11EventFilter(XEvent*)
Does no longer exist in Qt 5. Needs to be replaced.
2013-07-24 09:47:02 +02:00
Martin Gräßlin 2f9ff5591c Drop support for native graphics system
Qt 5 only supports raster which means our pixmaps are always non native,
so we don't need the Extension information any more and can drop all
special code handling for mapping a native QPixmap to an X11 pixmap.
2013-07-24 09:46:54 +02:00
Martin Gräßlin 2ea7be70b7 Remove not needed KCmdLineArgs::parsedArgs() in kdemain
It's also called in KWin::Application's ctor.
2013-06-26 17:58:43 +02:00
Martin Gräßlin 1276eb044f Move KWinSelectionOwner to main.(h|cpp)
KWinSelectionOwner is only used in KWin::Application which means that
utils is the wrong place for it.

REVIEW: 110245
2013-05-01 19:15:19 +02:00
Martin Gräßlin 98a04893a6 Use mgraesslin@kde.org for my mail address in Copyright and AboutData 2013-03-12 13:17:53 +01:00