Commit graph

108 commits

Author SHA1 Message Date
Martin Gräßlin
4a79cec8a6 Drop hacks and default rule for XV
Apparently it's not about mplayer but about XV [1], not really a relevant
application nowadays which would be important enough for having hacks.

REVIEW: 117479

[1] https://en.wikipedia.org/wiki/Xv
2014-04-10 15:04:19 +02:00
Martin Gräßlin
6828f33548 Remove hack for "mozilla"
It's dead, since 2006 it's "SeaMonkey" and it has a proper window class:
WM_CLASS(STRING) = "Navigator", "Seamonkey"

(Yes, I installed it. No, my distro doesn't have a package.)

REVIEW: 117472
2014-04-10 11:36:37 +02:00
Martin Gräßlin
bc0a9cb53a [kwin] Use std::find_if and lambda functions for Workspace::findClient
Instead of passing the macro based Predicate to findClient it now
expects a function which can be passed to std::find_if.

Existing code like:
xcb_window_t window; // our test window
Client *c = findClient(WindowMatchPredicated(window));

becomes:
Client *c = findClient([window](const Client *c) {
    return c->window() == window;
});

The advantage is that it is way more flexible and has the logic what
to check for directly with the code and not hidden in the macro
definition.

In addition there is a simplified overload for the very common case of
matching a window id against one of Client's windows. This overloaded
method takes a Predicate and the window id.

Above example becomes:
Client *c = findClient(Predicate::WindowMatch, w);

Existing code is migrated to use the simplified method taking
MatchPredicate and window id. The very few cases where a more complex
condition is tested the lambda function is used. As these are very
local tests only used in one function it's not worthwhile to add further
overloads to the findClient method in Workspace.

With this change all the Predicate macro definitions are removed from
utils.h as they are now completely unused.

REVIEW: 116916
2014-03-25 15:17:11 +01:00
Martin Gräßlin
b0c0e81661 Adjust kde-workspace to changes in NETWMClient
ctor changed to take NET::Properties and NET::Properties2.
2014-03-17 08:13:14 +01:00
Martin Gräßlin
2372e02752 [kwin] Use a QIcon in Client for the icons instead of Pixmaps
Client used to have dedicated methods for different icon sizes instead
of combining all pixmaps into one QIcon. This resulted in various parts
of KWin having different access to the icons:
* effects only got one pixmap of size 32x32
* decorations only got the 16x16 and 32x32 pixmaps combined into a QIcon
* tabbox could request all icon sizes, but only as pixmap

Now all sizes are available in one QIcon allowing to easily access the
best fitting icon in a given UI.
2013-12-06 14:41:23 +01:00
Martin Gräßlin
ba66fd9ef6 [kwin] NETWinInfo2 becomes NETWinInfo
And takes a xcb_connection_t instead of Display. Also our own class
is adjusted to no longer need the connection being passed in.
2013-11-18 13:56:28 +01: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
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
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
Fredrik Höglund
a87e8f5e8e kwin: Drop the xcb_icccm dependency
This dependency is causing build problems on a number of systems,
and it doesn't make much sense to bring in a whole library for three
one-line convenience functions.
2013-07-02 00:21:32 +02:00
Martin Gräßlin
5dae0cb010 Change Client::window_group to xcb_window_t
At the same time adjust name to m_camelCase to follow naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin
5afe5f810e Port Client::transient_for handling to XCB
The type of the transient_for related variables are changed to
xcb_window_t. They cannot be Xcb::Window as we don't take ownership over
the transient for window.

Variables are renamed to m_camelCase to follow naming scheme.

A wrapper for retrieving the TransientFor hint is added to the Xcb
Wrappers.
2013-05-28 11:55:38 +02:00
Martin Gräßlin
023de5b75e Remove Workspace pointer from Group
REVIEW: 110360
2013-05-13 08:28:21 +02:00
Martin Gräßlin
28d7b3c563 s/Window/xcb_window_t/g in workspace.h 2013-05-01 19:07:56 +02:00
Martin Gräßlin
89c2fd5598 Remove YesIKnowWhatImDoing from internal API
No need to have Allowed everywhere.

REVIEW: 110197
2013-04-26 12:29:42 +02:00
Martin Gräßlin
34d0df3e0a Remove Workspace::updateOnAllActivitiesOfTransients
Method is more or less just a clone of the Virtual Desktop variant and
not needed as toggleClientOnActivity already takes care of transients.
2013-04-11 13:01:36 +02:00
Martin Gräßlin
0976bdfb17 Adding transient (for) properties
TransientFor is a QObject property as we cannot declare Client as
a metatype.
2011-12-31 08:58:41 +01:00
Martin Gräßlin
9930044581 Drop an unimplemented method in Group
We didn't need it for years, so let's remove it and if we
really need it, it's easy to add again.

SVN_SILENT
2011-08-31 07:58:58 +02:00
Arthur Arlt
25654f25b8 Removing TopMenu
Since the funtionality of TopMenu did no longer work in KDE4 this feature was
removed from Workspace. Every reference to it was removed as well as commentaries
and documentation.

REVIEW: 101485
2011-06-24 12:27:56 +02:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking
73ec13310f update utility window visibility on property change and increase hiding delay - should prevent "mystic" disappearance of gimp utilities
svn path=/trunk/KDE/kdebase/workspace/; revision=1210458
2010-12-31 13:44:17 +00:00
Thomas Lübking
746cdddf76 adjust/fix behaviour of Modal Dialogs reg. Minimizing, Virtual Desktop change & Shading
BUG: 193611
BUG: 180195

svn path=/trunk/KDE/kdebase/workspace/; revision=1194907
2010-11-10 03:01:49 +00:00
Martin Gräßlin
5b54bb1d03 Forward port rev 1137263:
Make icon sizes 64x64 and 128x128 available in KWin and use it in TabBox for large icon modes.
So no more ugly upscaling.
CCBUG: 241384

svn path=/trunk/KDE/kdebase/workspace/; revision=1137264
2010-06-12 06:56:40 +00:00
Chani Armitage
24c7f96416 update activity of transients properly
svn path=/trunk/KDE/kdebase/workspace/; revision=1128655
2010-05-19 21:02:40 +00:00
Martin Gräßlin
9715014b4d Less krazy issues: fix spelling errors in comments.
SVN_SILENT

svn path=/trunk/KDE/kdebase/workspace/; revision=1063337
2009-12-17 21:16:10 +00:00
Frederik Schwarzer
a604e4a60d global typo fix
svn path=/trunk/KDE/kdebase/workspace/; revision=922431
2009-02-07 01:12:28 +00:00
Luboš Luňák
edcd0112fa Allow minimizing of modal dialogs, simply meaning that their main window
will be minimized too. Also don't disable the minimize animation for the dialog.
(bnc#431378)


svn path=/trunk/KDE/kdebase/workspace/; revision=908237
2009-01-09 14:07:03 +00:00
Rick Xing
4975618a22 add brace to avoid compiling warning of gcc
svn path=/trunk/KDE/kdebase/workspace/; revision=894172
2008-12-08 03:49:44 +00:00
Lucas Murray
6d41a1320e Moved all debug, warning and error messages into the KWin 1212 area.
Replaced deprecated kdDebug() with kDebug().
Removed empty debug messages.

svn path=/trunk/KDE/kdebase/workspace/; revision=885620
2008-11-17 15:04:52 +00:00
Jason vanRijn Kasper
fb0a01228f This change allows KWin to use the new NETWinInfo2 class (binary
compatibility class) and subsequently properly handle the
_NET_WM_FULLSCREEN_MONITORS EWMH spec hint.

svn path=/trunk/KDE/kdebase/workspace/; revision=885362
2008-11-17 08:03:39 +00:00
Laurent Montel
5535a9de5e Fix iterator
svn path=/trunk/KDE/kdebase/workspace/; revision=883047
2008-11-11 23:09:11 +00:00
Luboš Luňák
08571b2f52 Do not use 'assert( false )', with NDEBUG that is a no-op and
results in warnings about missing return.


svn path=/trunk/KDE/kdebase/workspace/; revision=861879
2008-09-17 11:44:51 +00:00
Luboš Luňák
d7889ad2e0 Avoid warning.
svn path=/trunk/KDE/kdebase/workspace/; revision=800951
2008-04-25 09:31:32 +00:00
Luboš Luňák
afa5700c7b Don't initialy minimize a window if it has some main window open,
but it was internall optimized away (e.g. one group transient plasma
dialog open, minimized, open another group transient dialog from plasma).


svn path=/trunk/KDE/kdebase/workspace/; revision=798569
2008-04-18 15:50:12 +00:00
Luboš Luňák
4f980ab082 This is backwards - remove the connection from the Client that
has it indirectly, not the direct one.


svn path=/trunk/KDE/kdebase/workspace/; revision=788477
2008-03-21 16:35:05 +00:00
Luboš Luňák
778e0ed51d Restart list searching after removing from it, just in case.
CCMAIL: faure@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=773631
2008-02-11 15:20:11 +00:00
Luboš Luňák
5bc01ac817 Prevent transient loops also when caused by 'this' (which doesn't have
the new value set yet).
BUG: 153360


svn path=/trunk/KDE/kdebase/workspace/; revision=748511
2007-12-14 17:29:19 +00:00
Luboš Luňák
01bf6cbb4c License cleanup - add headers where missing, be explicit about GPL
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=742302
2007-11-27 19:40:25 +00:00
Andreas Pakulat
39e322fc83 Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are
needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdebase/workspace/; revision=721704
2007-10-05 22:21:25 +00:00
Laurent Montel
994c800d79 Adapt to new KWarning/kFatal/kDebug api
svn path=/trunk/KDE/kdebase/workspace/; revision=695877
2007-08-03 06:59:24 +00:00
Luboš Luňák
ab1582de27 It's really interesting that KWin has had support for an arbitrary root
window, but I don't think it really works these days, and it's probably
also not useful at all.


svn path=/trunk/KDE/kdebase/workspace/; revision=689949
2007-07-19 16:24:51 +00:00
Luboš Luňák
3f12214c12 Merging from old trunk:
r619879 | lunakl | 2007-01-04 18:16:16 +0100 (Thu, 04 Jan 2007) | 3 lines

More transiency checks.


svn path=/trunk/KDE/kdebase/workspace/; revision=659522
2007-04-30 11:33:36 +00:00
Luboš Luňák
ce110c887f Merging from old trunk:
r619874 | lunakl | 2007-01-04 18:03:04 +0100 (Thu, 04 Jan 2007) | 4 lines

Properly add a window to a group.
(BUG: 139180)


svn path=/trunk/KDE/kdebase/workspace/; revision=659521
2007-04-30 11:33:14 +00:00
Luboš Luňák
23f8ebf2ab Merging from old trunk:
r613847 | lunakl | 2006-12-15 14:01:19 +0100 (Fri, 15 Dec 2006) | 4 lines

Don't crash because of automatic deleting of groups.
(BUG: 138834)


svn path=/trunk/KDE/kdebase/workspace/; revision=659483
2007-04-30 09:49:41 +00:00
Luboš Luňák
b8ceefc820 Merging from old trunk:
r613681 | lunakl | 2006-12-14 17:32:55 +0100 (Thu, 14 Dec 2006) | 4 lines

Check for references to no longer existing windows in transiency checks
only when the list of windows is in consistent state.


svn path=/trunk/KDE/kdebase/workspace/; revision=659481
2007-04-30 09:47:59 +00:00
Luboš Luňák
1f40973a83 Merging from old trunk:
r613666 | lunakl | 2006-12-14 16:35:36 +0100 (Thu, 14 Dec 2006) | 3 lines

Few more consistency checks.


svn path=/trunk/KDE/kdebase/workspace/; revision=659479
2007-04-30 09:46:31 +00:00
Luboš Luňák
4512d39171 Merging from old trunk:
r613277 | lunakl | 2006-12-13 19:53:55 +0100 (Wed, 13 Dec 2006) | 6 lines

Remove group transients from transient_list of windows from old group.
I have to say I'm rather impressed by the level of brokeness of Java's
window handling.
(BUG: 117677)


svn path=/trunk/KDE/kdebase/workspace/; revision=659478
2007-04-30 09:45:56 +00:00
Luboš Luňák
bbd7e25d2b Merging from old trunk:
r613274 | lunakl | 2006-12-13 19:48:58 +0100 (Wed, 13 Dec 2006) | 4 lines

Add checking code to detect inconsistencies of internal structures
for window relations, like #117677.


svn path=/trunk/KDE/kdebase/workspace/; revision=659476
2007-04-30 09:45:07 +00:00
Luboš Luňák
da1bbe0e64 Merging from old trunk:
r613271 | lunakl | 2006-12-13 19:29:43 +0100 (Wed, 13 Dec 2006) | 3 lines

Don't move a group transient with a group set to another group.


svn path=/trunk/KDE/kdebase/workspace/; revision=659475
2007-04-30 09:44:32 +00:00
Luboš Luňák
17182b9ccb Merging from old trunk:
r568991 | lunakl | 2006-08-02 18:27:34 +0200 (Wed, 02 Aug 2006) | 4 lines

Argh, order the checks properly, it wasn't detecting
correctly some cases when windows should belong together.


svn path=/trunk/KDE/kdebase/workspace/; revision=659268
2007-04-29 21:04:13 +00:00