Commit Graph

231 Commits (e62001758f254104129ea55d29367ee17fb82ec8)

Author SHA1 Message Date
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
Martin Gräßlin 898e120be9 Extract messages from scripts and scripting module
Messages in scripts are written to kwin_scripts.pot, messages in
scripting are written to kwin_scripting.pot. The cataloges are loaded in
the configuration interfaces and in main kwin.

REVIEW: 108975
2013-03-04 10:29:25 +01:00
Martin Gräßlin c2943c63a5 Port KWin::errorMessage to new Xcb::Extensions
Code section had been in an #ifndef NDEBUG which is the reason why I did
not find the usage of Extensions there and why it always compiled
successfully.

Some data elements which got dropped needed to be added again like a name
for the extension and errorBase, etc.

Sorry for the inconvenience of a semi-broken master.
2013-01-22 13:17:07 +01:00
Grégory Coutant e005e18a0f Add ability to disable multihead support
REVIEW: 107735
2013-01-11 09:37:19 +01:00
Martin Gräßlin d02405aa51 Remove duplicated include
REVIEW: 107998
2013-01-02 18:36:49 +01:00
Martin Gräßlin b0da055850 Do not check whether -session cmd argument is passed to kwin in kdemain
This got used to check whether the session is being restored and only if
the session was not being restored the multi-head checks used to be
performed. Since 299a78772b823d28cf3c48aff696cfb978d0ae7e the multi-head
checks are no longer bound to not restoring the session which obsoletes
the remaining checks.

REVIEW: 107468
2012-11-26 16:36:22 +01:00
Martin Gräßlin f3443a6b07 Add CMake variable to rename kwin binaries
A CMake variable is used to specify the name of the binary.
By default this is "kwin" but building for PA changes the
name to "kwinactive". The variable adjusts all names, e.g.
kwinnvidiahack becomes kwinactivenvidiahack.

The remaining usage of kwinrc in core and libs is replaced
by a cmakedefine for the configuration name and all data
installations are moved to the defined name. Dynamic loading
for scripts & co is adjusted for loading based on defined name.

This change allows the side-by-side installation of both kwin
for desktop and kwin for Plasma Desktop without the known
issues like conflicts in config files or missing build options
if kwin desktop is used for Plasma Active.

Likewise the KCMs are not adjusted as they are not intended to
be used for kwinactive.

REVIEW: 104299
BUG: 296084
FIXED-IN: 4.9.0
CCMAIL: active@kde.org
2012-05-10 10:25:15 +02:00
Martin Gräßlin 3ed63d4c45 Reparse Configuration at startup asynchronous
Options loading is split into three parts:
* reparse configuration
* loading of non-compositing related options
* loading of composited related options not needing CompositingPrefs

At startup the reparsing of configuration is done through a Thread
to gain a little bit of less waiting.

Before something else accesses the KConfig for the first time we
wait for the thread to finish and perform the other two loading
operations of Options.

The settings depending on CompositingPrefs will only be invoked
if a compositor is going to be needed.

REVIEW: 104562
2012-04-22 22:29:07 +02:00
Martin Gräßlin 818714432f Move Scripting from main to Workspace
Scripting can be started after everything else is started, there
is no reason to have it in main.cpp.
2012-04-22 22:28:56 +02:00
Martin Gräßlin 561199762f Move trim malloc from KWorkspace to KWin
It is only used by KWin and KWin does not use anything else
from KWorkspace.

REVIEW: 104446
2012-04-09 11:29:46 +02:00
Martin Gräßlin 40970a32f1 Drop workaround for BUG 157659
Workaround for a Qt4.4RC1 redrawing bug is no longer needed.
CCBUG: 157659
REVIEW: 104300
2012-03-22 06:46:33 +01:00
Martin Gräßlin b49b2e7c89 Drop unused command line option 2012-03-16 10:53:07 +01:00
Thomas Lübking 0b23c516a7 add support for graphicssystem selection
REVIEW: 103430
CCBUG: 289904
2012-01-02 18:53:20 +01:00
Martin Gräßlin 3232c2cb2a Remove duplicate includes
Krazy--
SVN_SILENT
2011-08-03 08:25:10 +02:00
Raymond Wooninck 7951d66ae4 Fix the includes (due to removal of libs/kworkspace as includedir) 2011-07-26 07:50:58 +02:00