Commit graph

113 commits

Author SHA1 Message Date
Martin Gräßlin
ca6f3e329d [kwin] Fix includes of NETWM
Used kde4support variant.
2014-03-18 14:32:53 +01:00
Martin Gräßlin
3346e04769 [kwin] Remove config-X11.h includes
None of the defines is used.
2014-03-18 10:00:49 +01:00
Aleix Pol
c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +01:00
Martin Gräßlin
fdee4ea8c8 Adjust kde-workspace to introduction of flags in NET classes 2014-02-05 17:40:19 +01:00
Martin Gräßlin
1576c55cd2 [kwin] Add better support for Notification windows
KWin starts to support the Notification window type and has an own
layer for all notification windows. They are kept above the above
layer but do not go over active fullscreen windows.

REVIEW: 115298
2014-01-28 07:40:34 +01:00
Martin Gräßlin
40588e05ea Clean up the includes in kwin/options.(h/cpp)
Used to include quite a bit no longer needed. In order to get rid of
the utils.h inclusion one enum is moved to options (where it actually
belongs to).
2013-09-09 06:03:35 +02:00
Martin Gräßlin
37334f400a Drop no longer needed XLib includes from KWin 2013-08-20 10:29:20 +02:00
Martin Gräßlin
64e464afe5 Use xcb_window_t in Motif::readFlags
Actual method is not ported to XCB yet.

REVIEW: 110269
2013-05-13 09:33:29 +02:00
Martin Gräßlin
dfec59c60e Port getStringProperty to XCB 2013-05-13 08:48:19 +02:00
Martin Gräßlin
cefaa756e7 Port ClientWinMask to XCB
Enum values are nicer than defines.
2013-05-13 08:48:19 +02:00
Martin Gräßlin
5018c35313 Port timestampCompare/Diff to xcb
basically: s/Time/xcb_timestamp_t/g
2013-05-13 08:48:19 +02:00
Martin Gräßlin
7e9d7f3959 Port (un)grabXKeyboard to XCB 2013-05-13 08:48:19 +02:00
Martin Gräßlin
ce9ce6f94c Remove unused typedefs in utils.h
There is no Const(Toplevel|Unmanaged|Deleted|Group)List used anywhere.
For ConstToplevelList there was a debug helper which was also unused.

REVIEW: 110196
2013-05-02 09:21:02 +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
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
4a28d000cf Move ShortcutDialog to useractions
It's only used from useractions.cpp which means that it's not the best
fit in utils. We can see the problems with it given that it was in an
ifdef and it included quite some headers into everything.

REVIEW: 110189
2013-04-26 08:53:13 +02:00
Martin Gräßlin
22ecba3b7d Cleanup of includes in utils.h
* removed unneeded includes
* reordered
* camel case

REVIEW: 110188
2013-04-26 08:50:24 +02:00
Martin Gräßlin
03656a2abe Remove ShapeInput define from utils.h
It's nowhere used inside KWin.

REVIEW: 110190
2013-04-26 08:39:01 +02:00
Martin Gräßlin
ee537050dd Remove extern initing from utils.h
It's only used in main.cpp where the static variable is defined.

REVIEW: 110191
2013-04-26 08:38:00 +02:00
Martin Gräßlin
544b772e42 Use non obsoleted ctor for KXMessages 2013-03-07 13:59:16 +01:00
Martin Gräßlin
4f536c7f3d Extend ScopedCPointer from QScopedPointer with QScopedPointerPodDeleter
REVIEW: 108242
2013-01-25 08:56:33 +01:00
Martin Gräßlin
5cd223f051 Improved resolving whether a window is on local machine
Most windows use the hostname in WM_CLIENT_MACHINE, but there are windows
using the FQDN (for example libreoffice). So instead of "foo" it is
"foo.local.net" or similar. The logic so far has been unable to properly
determine whether windows with FQDN are on the local system.

In order to solve this problem the handling is split out into an own
class which stores the information of hostname and whether it is a local
machine. This is to not query multiple times. To determine whether the
Client is on the local system getaddrinfo is used for the own hostname
and the FQDN provided in WM_CLIENT_MACHINE. If one of the queried
names matches, we know that it is on the local machine. The old logic to
compare the hostname is still used and getaddrinfo is only a fallback in
case hostname does not match.

The problem with getaddrinfo is, that it accesses the network and by that
could block. To circumvent this problem the calls are moved into threads
by using QtConcurrent::run.

Obviously this brings disadvantages. When trying to resolve whether a
Client is on the local machine and a FQDN is used, the information is
initially wrong. The new ClientMachine class emits a signal when the
information that the system is local becomes available, but for some
things this is just too late:
* window rules are already gathered
* Session Management has already taken place

In both cases this is an acceptable loss. For window rules it just needs
a proper matching of the machine in case of localhost (remote hosts are
not affected). And the case of session management is very academic as it
is unlikely that a restoring session contains remote windows.

BUG: 308391
FIXED-IN: 4.11
REVIEW: 108235
2013-01-21 16:00:49 +01:00
Martin Gräßlin
533d57da60 Mark most ctors as explicit as reported by Krazy2 checker 2013-01-02 18:35:46 +01:00
Martin Gräßlin
e96ff7a31a Introduce an XServerGrabber helper class
Performs grabXServer in ctor and ungrabXServer in dtor. Useful to ensure
that each grab is matched by an ungrab.
2012-12-20 16:30:39 +01:00
Fredrik Höglund
36f05628f8 kwin: Add a ScopedCPointer class
This class is functionally the same as QScopedPointer, but uses
free() instead of delete.
2012-11-07 22:13:12 +01:00
Martin Gräßlin
2d954a6bf3 Make the Scene owned by the Compositor
The Scene has always been created and destroyed inside what is
now the split out compositor. Which means it is actually owned
by the Compositor. The static pointer has never been needed
inside KWin core. Access to the Scene is not required for the
Window Manager. The only real usage is in the EffectsHandlerImpl
and in utils.h to provide a convenient way to figure out whether
compositing is currently active (scene != NULL).

The EffectsHandlerImpl gets also created by the Compositor after
the Scene is created and gets deleted just before the Scene gets
deleted. This allows to inject the Scene into the EffectsHandlerImpl
to resolve the static access in this class.

The convenient way to access the compositing() in utils.h had
to go. To provide the same feature the Compositor provides a
hasScene() access which has the same behavior as the old method.
In order to keep the code changes small in Workspace and Toplevel
a new method compositing() is defined which properly resolves
the state. A disadvantage is that this can no longer be inlined
and consists of several method calls and pointer checks.
2012-08-26 20:43:57 +02:00
Martin Gräßlin
f8fd648a61 Move Client::layer() to Toplevel
This allows to copy the layer to the deleted window in order to
keep the deleted window in the same layer.

Additionally a new layer is added for unmanaged windows.
2012-04-20 08:36:23 +02:00
Martin Gräßlin
711fd0b876 Drop include for config-workspace.h
None of the definitions is used anywhere in kwin.
REVIEW: 104081
2012-02-26 17:23:19 +01:00
Martin Gräßlin
0c47ca5e97 Remove defines for X extensions
The following dependencies have become mandatory build deps:
* XRandR
* XRender
* XFixes
* XDamage
* XComposite
2011-08-13 16:46:43 +02:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking
e8b01efe44 improve keyboard navigation of the window shortcut dialog, add a conflict warning
kkeysequencewidget only needs the pushbutton as focusproxy
BUG: 182873
BUG: 251297

svn path=/trunk/KDE/kdebase/workspace/; revision=1195365
2010-11-10 22:28:15 +00:00
Lucas Murray
8a8428e41c Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042572
2009-10-30 06:51:59 +00:00
Lucas Murray
743e058af5 Detect when _MOTIF_WM_HINTS gains or loses the no border hint.
Patch by Daniel Erat.
BUG: 201523

svn path=/trunk/KDE/kdebase/workspace/; revision=1030932
2009-10-03 14:32:24 +00:00
Lucas Murray
ca901dae30 Improved window movement around struts. Windows can be moved anywhere
where the titlebar is still clickable even if it is outside the normal
work area. When struts are added or removed only move the windows that
cover the same area, leave all others untouched. If a strut is removed
on a xinerama screen that is not on the edge of the full desktop area
prevent the windows from being moved offscreen. Prevent struts/panels
from interfering with the movement of windows on other xinerama screens.
BUG: 74559
BUG: 90833
BUG: 160068

svn path=/trunk/KDE/kdebase/workspace/; revision=927466
2009-02-17 15:50:00 +00:00
Luboš Luňák
7249ca2cfb Do self-check immediatelly during compositing setup only when it's not KWin startup
at the same time (in other words, only when activating compositing using the kcm).
Currently selfcheck causes bad flicker (due to X mapping the overlay window
for too long?) which looks bad during KDE startup. With this patch, KDE startup
is without any flicker.


svn path=/trunk/KDE/kdebase/workspace/; revision=923842
2009-02-09 14:51:11 +00:00
Michael Jansen
d6df278f49 Use the new session shortcut feature for kwins "Window Shorcut" feature.
@Lubos: Please have a look at commit 863096 too. I accidently commited a
part of this part there. Please have a look at the todo "Add the window
title" and possibly implement it. That would look much nicer in the global
shortcuts kcm.

Btw. There are two shortcuts dialogs in kwin. I haven't change the other
one (kwinrules) because it look it works better with KKeySequenceWidget
doing the message box.

CCMAIL:l.lunak@kde.org

svn path=/trunk/KDE/kdebase/workspace/; revision=863292
2008-09-21 18:03:59 +00:00
Luboš Luňák
63b01aff5d Rework handling of mapping and unmapping windows, in particular:
- the NormalState/IconicState things in ICCCM need to match exactly
  the real mapping state, so ensure that, no matter how superfluous that is
- extend the option for having live window previews either for all
  windows or for only all shown windows (default)
FEATURE: 163385


svn path=/trunk/KDE/kdebase/workspace/; revision=845772
2008-08-12 11:02:58 +00:00
Luboš Luňák
01d9d88580 Add a dbus call to query which color settings the current decoration
supports, to be used by kcmcolors.


svn path=/trunk/KDE/kdebase/workspace/; revision=788598
2008-03-21 22:17:10 +00:00
Luboš Luňák
bb433ac40e No longer include config*.h files in installed headers.
Also slightly redo the #define's for effects, now it's:
- #ifdef KWIN_HAVE_COMPOSITING to check whether there's any compositing support at all
- #ifdef KWIN_HAVE_OPENGL_COMPOSITING to check for OpenGL-based compositing
- #ifdef KWIN_HAVE_XRENDER_COMPOSITING the same for XRender
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=749628
2007-12-17 14:14:53 +00:00
Luboš Luňák
3b2b091c34 Make a clear distinction between types we support only for compositing
and types that are actually supported when managing windows.


svn path=/trunk/KDE/kdebase/workspace/; revision=746036
2007-12-07 15:53:43 +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
Luboš Luňák
1b8b326c7b Replace warnings about KShortcutDialog being dead with something that is not dead.
Now, since I don't see any shortcuts-related hacks, why exactly am I supposed
to contact you?
CCMAIL: ahartmetz@gmail.com
BUG: 151642 


svn path=/trunk/KDE/kdebase/workspace/; revision=731744
2007-11-01 19:24:35 +00:00
Rivo Laks
a3781228cb Move Extensions class to lib/kwinglobals.*
svn path=/trunk/KDE/kdebase/workspace/; revision=717329
2007-09-26 16:31:06 +00:00
Luboš Luňák
9052116e4f Support for having previews even for unmapped windows - they're
actually kept mapped, so that they still have the backing pixmap.
Plus some small tricks to prevent such windows from interfering.
Only two basic modes are implemented right now.


svn path=/trunk/KDE/kdebase/workspace/; revision=683156
2007-07-04 09:51:10 +00:00
Dirk Mueller
e625a97905 include cleanups
svn path=/trunk/KDE/kdebase/workspace/; revision=680057
2007-06-25 11:03:18 +00:00
Luboš Luňák
162d6ac7c9 Support for _NET_WM_SYNC_REQUEST, based on a patch
by Rayiner Hashem <gtg990h@mail.gatech.edu>.


svn path=/trunk/KDE/kdebase/workspace/; revision=679986
2007-06-25 08:51:44 +00:00
Luboš Luňák
1caa3f95ed Properly check for all needed extensions and handle gracefully absence.
svn path=/trunk/KDE/kdebase/workspace/; revision=669827
2007-05-30 14:22:09 +00:00
Luboš Luňák
ee040a6681 Merging from old trunk:
r644597 | mueller | 2007-03-20 15:21:56 +0100 (Tue, 20 Mar 2007) | 2 lines

pedantic--


svn path=/trunk/KDE/kdebase/workspace/; revision=659566
2007-04-30 12:23:20 +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
04d5294afa Merging from old trunk:
r573246 | lunakl | 2006-08-15 14:48:37 +0200 (Tue, 15 Aug 2006) | 3 lines

Fix compilation with older XShape (#132310).


svn path=/trunk/KDE/kdebase/workspace/; revision=659279
2007-04-29 21:38:44 +00:00