Commit Graph

570 Commits (91a6efce337eb650c3e2ce29e7dc57a036dd3f79)

Author SHA1 Message Date
Thomas Lübking d61e6cd445 improve restricted moveresize
* skip all overhead on unrestricted moveResizes
* the titlebar is not guaranteed to be the top border (anymore)
* don't block vertical resize when resizing on a top corner
* reduce QRegion operations by knowledge about the degenerated titlebarregion (rect)
* rename int (sic!) "titleArea" to "requiredPixels"

REVIEW: 125428
2015-09-29 23:02:41 +02:00
Martin Gräßlin 6dc211dfaf Workspace::adjustClientSize operates on AbstractClient
And now also during resizing clients snap to ShellClients.
2015-09-18 14:05:19 +02:00
Martin Gräßlin 47d2b4cb49 Workspace::adjustClientPosition operates on AbstractClient
With that moving clients snap also against ShellClients and not just
Clients.
2015-09-18 13:46:42 +02:00
Martin Gräßlin 2da04aa26b Use auto where we call ensureStackingOrder(client->transients())
Preparation step for switching transients from Client to AbstractClient.
2015-09-16 13:54:47 +02:00
Thomas Lübking 266edb123d Merge branch 'Plasma/5.4' 2015-08-15 01:58:07 +02:00
Thomas Lübking 269e275cb0 smart placement of unregularily max'd clients
1. if a client has oversize, ensure to keep the titlebar in
sight

2. if a maximized client *almost* covers the entire maximization
area, users can easily be trapped to click into the missing
pixels, thus the client below.

Therfore the clients is then stuffed into one corner, with
preference to the titlebar edge and the screen area (ie.
*away* from panels and towards actual screen borders because
of fitt's law)

BUG: 349935
REVIEW: 124286
FIXED-IN: 5.4
2015-08-15 01:34:41 +02:00
Thomas Lübking eb71b47db4 only discard pixmaps when the XCB Window resized
Causes invalid textures on the nvidia blob
when referencing textures for crossfading
eg. during maximization

BUG: 324823
REVIEW: 124591
FIXED-IN: 5.4
2015-08-15 01:34:41 +02:00
Martin Gräßlin 3139dcd3b9 Drop cmakedefine HAVE_WAYLAND
Now a required build dependency.
2015-08-12 11:39:20 +02:00
Martin Gräßlin 2192bd69e0 [wayland] Add support for PanelBehavior in ShellClient
The PanelBehavior determines the stacking of panel surfaces and whether
they "have a strut".
2015-06-20 00:14:49 +02:00
Thomas Lübking 39c35f8f48 fix sendToScreen/checkWorkspaceGeometry
Prime target is to preserve the in-screen
condition of client AND window.i[1]
Atm. when the client is fully in sight
(but the window is not) - regardless of snapping
or screen change - a workspace update (screen change,
resolution change, adding/removing a strutting panel)
would allow the client to partiall escape screen bounds.

This is changed so that if the client is fully in sight,
it's kept fully in sight (but not the decoration)
If the entire window was fully in sight, it's also kept
(as is right now)
The code handles inner screen edges (if the client was in sight,
the entire window will be if we'd bleed to the other screen)

[1] I'd say that handling the client is more relevant,
but foresee more complaints if the window wasn't handled anymore ;-)

During that, i stumbled across some other issues.
- when a window centered on one screen is moved to a screen smaller
  than the window, the window is shrinked to the dimensions of that
  screen and now randomly touches eg. left AND right edge. When
  moved back, the right and bottom edge were preferred
  (to the window was "moved" into the lower right corner).
  It's now kept centered.
- geom_restore was saved before keeping the window in the new
  screen area (causing accidental drops on screen changes)

BUG: 330968
REVIEW: 122517
FIXED-IN: 5.4

Prime target is to preserve the in-screen condition
of client AND window.[1]
Atm. when the client is fully in sight (but the window is not) -
regardless of snapping or screen change - a workspace update
(screen change, resolution change, adding/removing a strutting
panel) would allow the client to partiall escape screen bounds.

This is changed so that if the client is fully in sight,
it's kept fully in sight (but not the decoration)
If the entire window was fully in sight, it's also kept
(as is right now)
The code handles inner screen edges (if the client was in sight,
the entire window will be if we'd bleed to the other screen)

[1] I'd say that handling the client is more relevant,
but foresee more complaints if the window wasn't handled anymore ;-)

During that, i stumbled across some other issues.
- when a window centered on one screen is moved to a screen
smaller than the window, the window is shrinked to the dimensions
of that screen and now randomly touches eg. left AND right edge.
When moved back, the right and bottom edge were preferred
(to the window was "moved" into the lower right corner).
It's now kept centered.
- geom_restore was saved before keeping the window in the new
screen area (causing accidental drops on screen changes)

BUG: 330968
REVIEW: 116029
FIXED-IN: 5.3
2015-06-19 19:48:39 +02:00
Thomas Lübking acb8016e65 make checkOffscreenPosition multiscreen aware
on a multiscreen setup, the window can be off in multiple directions

CCBUG: 336193
REVIEW: 124122
2015-06-18 22:41:26 +02:00
Thomas Lübking e830f08def update geom_restore when silently breaking QT mode
the next checkWorkspacePosition (now triggered by
deco border update) would falsely restore the
pre-tiling geometry

BUG: 348640
REVIEW: 123882
2015-06-10 08:50:17 +02:00
Thomas Lübking 0b9cfffe1a checkWorkspacePosition: Don't adjust to shaded sz
since the client is currently empty, we'll resort
to client hints, ie. effectively resize windows
when shading them (setGeometry and plainResize have
extra checks on whether this geometry is only the decoration
height to not smear client_size)

REVIEW: 123882
BUG: 348064
2015-06-10 08:50:17 +02:00
Thomas Lübking 7f71c89111 don't nuke both dims if undecorated frame isEmpty
isEmpty hits if one dimension is <= 0 - the other one
can be absolutely valid, so preserve it.

REVIEW: 123882
2015-06-10 08:50:17 +02:00
Martin Gräßlin 2bdabe62aa [wayland] Check for docks in ShellClient in Workspace::updateClientArea
A ShellClient can have window type dock. In that case it's considered to
have a strut. That is currently every panel restricts the area. On the
other hand only internal clients can be docks at the moment. For Plasma's
panels a dedicated interface will be needed.
2015-06-08 21:29:07 +02:00
Martin Gräßlin 4ca3734d12 [wayland] Support move/resize mode in pointer move handling 2015-06-06 17:43:12 +02:00
Thomas Lübking f887c7d4ee Merge branch 'Plasma/5.3' 2015-06-03 21:40:08 +02:00
Thomas Lübking 1df2d5979f keep quick maximized w/ size restritions in screen
... bounds
BUG: 348121
REVIEW: 123910
2015-06-03 21:22:22 +02:00
Martin Gräßlin 737ad0b664 Move keepInArea to AbstractClient 2015-05-27 14:20:12 +02:00
David Edmundson df1499784f move isFullScreenable to AbstractClient
REVIEW: 123871
2015-05-21 16:40:21 +01:00
Martin Gräßlin 4b41c33268 Workspace::movingClient changed to AbstractClient
In events.cpp it's casted to Client as it's X11 specific.
In InputRedirections it's kind of broken, but window movement is
anyway broken.
2015-05-08 12:43:45 +02:00
Martin Gräßlin aa1e9161d5 Workspace::clientArea takes AbstractClient instead of Client 2015-05-08 12:43:44 +02:00
Thomas Lübking 08b7b4818b unmaximize from partial to enter quick tiling
BUG: 345423
FIXED-IN: 5.3
2015-04-07 23:59:16 +02:00
Martin Gräßlin dfa89cc050 Port reading Motif hints to XCB
A wrapper class for MotifHints is added to xcbutils. This class manages
the information about the read Motif hints, so that Client doesn't need
to have a copy of the read states.

The class is designed in a way that during Client::manage we get rid of
another roundtrip.

REVIEW: 122378
2015-02-06 13:43:57 +01:00
Thomas Lübking 93fb58aa88 Merge branch 'Plasma/5.2' 2015-02-06 00:29:55 +01:00
Thomas Lübking ff700a8db5 fix e3768b4355
accidentally picked the patch from the wrong branch
just about comments
2015-02-06 00:27:31 +01:00
Thomas Lübking 74e3167732 save geom_restore before calling for border update
otherwise the stored geometry would be correct for
maximized borders, thus the unmaximized borders
make the window to small on unmaximizing

BUG: 343691
FIXED-IN: 5.2.1
REVIEW: 122416
2015-02-05 21:37:34 +01:00
Thomas Lübking f496a91e59 updateFocusMousePosition() before some actions
in particular artificial geometry updates that should not
update the focus and are prone to a static cursor

BUG: 343319
REVIEW: 122299
FIXED-IN: 5.2.1
2015-02-05 21:37:33 +01:00
Thomas Lübking 92aa2fb553 save geom_restore before calling for border update
otherwise the stored geometry would be correct for
maximized borders, thus the unmaximized borders
make the window to small on unmaximizing

BUG: 343691
FIXED-IN: 5.2.1
REVIEW: 122416
2015-02-05 17:15:11 +01:00
Thomas Lübking e3768b4355 updateFocusMousePosition() before some actions
in particular artificial geometry updates that should not
update the focus and are prone to a static cursor

BUG: 343319
REVIEW: 122299
FIXED-IN: 5.2.1
2015-02-05 17:05:34 +01:00
Martin Gräßlin 2076e458d3 Use Xcb::GeometryHints instead of XGetWMNormalHints
Xcb::GeometryHints is a convenient wrapper around the size hints
as described in ICCCM combined with the sanity checks so far applied
by KWin after reading the property.

Instead of accessing the members of the property structure, we are
now using the convenience methods.

During ::manage no further actions are triggered when reading the
size hints. Only when they are read later on the previous checks
are applied. During ::manage they can be ignored as it had a dedicated
isManaged check.

The method ::resizeWithCheck got a new argument of type xcb_gravity_t
which defaults to 0. This is needed from ::configureRequest which so
far temporarily changed the xSizeHints structure. By passing as an
argument this is no longer needed.

REVIEW: 122185
2015-01-27 12:48:03 +01:00
Thomas Lübking f82a6a545c preserve actual geom_restore on QuickTileMaximize
BUG: 342981
REVIEW: 122118

The geometry of the window when entering QTM is
a technical detail (caused by the maximizing action
of moving the window to the upper edge) and thus
does not qualify as geometry the window should be
restored to (using a deoc button, shortcut etc.)
2015-01-24 22:20:29 +01:00
Martin Gräßlin 38849215d5 Recursion check while decoration updates the borders
Mostly a safety check, but fixes a crash with borderless maximized
windows. If that option is set we also do not notify the decoration
at all, as the deco will be destroyed anyway.

BUG: 341675
REVIEW: 121858
2015-01-08 12:50:05 +01:00
Thomas Lübking 8de4e4d84e determine screenArea by geom_restore in checkWSP
checkWorkspacePosition() operates on geom_restore
to preserve window positions on temporary
(without moving/resizing the window by the user)
screen layout/geometry changes.

Therefore, in the multiscreen case the
screenbound check must be done towards
the screen the window *would* be on
according to geom_restore, not the one
it is right now.

CCBUG: 161325
REVIEW: 121320
FIXED-IN: 5.2
2015-01-08 00:09:11 +01:00
Martin Gräßlin 5ceb1b4f75 Merge branch 'Plasma/5.1'
Conflicts:
	CMakeLists.txt
	geometry.cpp
	kcmkwin/kwincompositing/kcmkwineffects.desktop
	kcmkwin/kwincompositing/kwincompositing.desktop
	kcmkwin/kwindecoration/kwindecoration.desktop
	kcmkwin/kwindesktop/desktop.desktop
	kcmkwin/kwinoptions/kwinactions.desktop
	kcmkwin/kwinoptions/kwinadvanced.desktop
	kcmkwin/kwinoptions/kwinfocus.desktop
	kcmkwin/kwinoptions/kwinmoving.desktop
	kcmkwin/kwinoptions/kwinoptions.desktop
	kcmkwin/kwinrules/kwinrules.desktop
	kcmkwin/kwinscreenedges/kwinscreenedges.desktop
	kcmkwin/kwintabbox/kwintabbox.desktop
	scripts/enforcedeco/metadata.desktop
2014-12-10 13:52:27 +01:00
Martin Gräßlin d6014927e7 Cleanup electric border handling in leaveMoveResize
If a Client closed during move/resize with the outline being shown
for quick tile/maximize area, the outline never got removed.

BUG: 341673
FIXED-IN: 5.1.2
REVIEW: 121410
2014-12-10 07:45:39 +01:00
Daniel Pastushchak 0d997b1093 Introduce categorized logging for kwin core
Done by Daniel Pastushchak for KDE during GCI-2014.
2014-12-05 14:27:15 +01:00
Martin Gräßlin 3d9a035312 Move MaximizeMode from KDecorationDefines to utils.h
Unfortunately it cannot be a enum defined in Client as client.h
depends on rules.h and with it in Client rules.h would depend on
client.h.
2014-12-02 13:49:08 +01:00
Martin Gräßlin d4e2f19ef0 Workspace does not need to inherit from KDecorationDefines 2014-12-02 11:17:43 +01:00
Martin Gräßlin fa4332754c Move Position from KDecorationDefines to Client 2014-12-02 11:15:54 +01:00
Martin Gräßlin c2e53b9a2f Merge branch 'kdecorations2'
Conflicts:
	effects.cpp
	paintredirector.cpp
2014-12-02 08:38:10 +01:00
Martin Gräßlin 6bdd0e96f6 [kdecoration] Decoration::client returns a QWeakPointer
In aurorae a wrapper property is added.
2014-11-28 16:28:39 +01:00
Martin Gräßlin cc98c5d9c7 Use screens()->geometry() in Workspace::desktopResized
It used to get the individual screen geometries from QDesktopWidget.
We don't need to go through QDesktopWidget any more as Screens
contains all the information we need in a more reliable way.
2014-11-27 09:00:19 +01:00
Martin Gräßlin b7a8bb4f52 Drop build option KWIN_BUILD_SCREENEDGES
The build option got introduced for Plasma Active back in a time
when we did not properly aim for convergence. In a Plasma 5 world
we want to have only one shell and one window manager which adjust
itself. This means we don't want a differently compiled kwin for
plasma active, but the same one. Thus the build option doesn't
make much sense any more. A KWin for touch interface needs to support
screenedges for the case that mouse is plugged in.

CCBUG: 340960
REVIEW: 121200
2014-11-24 10:48:49 +01:00
Martin Gräßlin 7154cfee42 Drop size from Client::resizeDecoration
No longer used.
2014-07-25 14:02:27 +02:00
Martin Gräßlin d3a91b67d9 Emit a signal if the QuickTileMode changes 2014-07-25 14:02:27 +02:00
Martin Gräßlin 0030eb7f84 Initial import of support for new KDecoration2 based decorations
NOTE: this is not working completely yet, lots of code is still ifdefed
other parts are still broken.

The main difference for the new decoration API is that it is neither
QWidget nor QWindow based. It's just a QObject which processes input
events and has a paint method to render the decoration. This means all
the workarounds for the QWidget interception are removed. Also the paint
redirector is removed. Instead each compositor has now its own renderer
which can be optimized for the specific case. E.g. the OpenGL compositor
renders to a scratch image which gets copied into the combined texture,
the XRender compositor copies into the XPixmaps.

Input events are also changed. The events are composed into QMouseEvents
and passed through the decoration, which might accept them. If they are
not accpted we assume that it's a press on the decoration area allowing
us to resize/move the window. Input events are not completely working
yet, e.g. wheel events are not yet processed and double click on deco
is not yet working.

Overall KDecoration2 is way more stateful and KWin core needs more
adjustments for it. E.g. borders are allowed to be disabled at any time.
2014-07-25 14:02:26 +02:00
Thomas Lübking 75a298a4fb allow FS mapping of geometry restricted windows
and copy isSpecialWindow() check as rulebook input
to setFullscreen()

Client::isFullScreenable() checks:
* fullscreen rule
* fullscreen_hack (-> for normal windows)
* geometry restrictions
* special window

Client::manage() for fullscreeining checks:
* fullscreen rule (with correct "initial" parameter)
* fullscreen_hack

-> this breaks the fullscreen rule for geometry restricted windows
and causes inconsistent behavior between client requests at runtime
(which do not test ::isFullScreenable()) and on mapping.

Otoh, the specialWindow() protection should apply generally - those
kind of windows should not be fullscreened since the user can not
exit this state via kwin for them - and there's hardly a good reason
for them to be fullscreen, esp. not to enter that state at runtime

REVIEW: 118442
CCBUG: 335617

Cherry-picked from kde-workspace
43229afee9fac4303e3d280ea63f96f034b3ffb5
2014-07-10 13:36:50 +02:00
Thomas Lübking 5d8ae96a56 take fullscreen windows out of tabbing
it's not been possible to attach tabs to an (undecorated!)
fullscreen window.
now it's neither possible to attach a fullscreen window to
another tabgroup and fullscreening a window will untab it

CCBUG: 332568

Forward port of abf3d200cfc39fcc27a22224512853a96d947add from kde-workspace
2014-06-04 16:30:29 +02:00
Thomas Lübking 90fb9a5aa9 prevent moving of FS windows on 1-screen setup
CCBUG: 332565

Forward port of 124b6783de6f8f4cfb05289fa3398a7be164691b from kde-workspace
2014-06-04 16:30:29 +02:00
Martin Gräßlin 4a7f293078 Port sendSyntheticConfigureNotify to xcb
REVIEW: 118143
2014-05-19 09:13:46 +02:00
Martin Gräßlin 9cce470c35 Turn Client::delayedMoveResize() into a lambda slot
Only used for the delayedMoveResizeTimer as timeout slot. Code is small
so a lambda makes more sense. At the same time the code is slightly
improved to ensure that startDelayedMoveResize is never called while
the timer is already active.

This means that mousePressEvents are now required to come from the
decoration.

REVIEW: 117843
2014-05-07 10:21:03 +02:00
Martin Gräßlin 9075b5e2d6 [kwin] Remove cursorPos() from utils.h
Only delegated to Cursor::pos() anyway, so let's just use that directly.
Fixes the annoyances of having to mock it in the unit tests which include
utils.cpp.

REVIEW: 116900
2014-03-25 15:25:40 +01:00
Martin Gräßlin d6b346df92 [kwin] Remove TemporaryAssign from utils.h
Only used in geometry.cpp for MaximizationState and that's no
longer needed.

REVIEW: 116902
2014-03-20 07:05:41 +01:00
Martin Gräßlin abecbf2369 [kwin] Port away from deprecated functionality in KWindowSystem
Less warnings and more type safety.
2014-03-17 10:22:20 +01:00
Martin Gräßlin 2675b5d4e7 Merge branch 'KDE/4.11'
Conflicts:
	CMakeLists.txt
	kcontrol/screensaver/screensaver.desktop
	kdm/kfrontend/themes/elarun/KdmGreeterTheme.desktop
	khotkeys/kcm_hotkeys/kcm_hotkeys.cpp
	kinfocenter/main.cpp
	kscreensaver/kblank_screensaver/blankscrn.cpp
	kscreensaver/krandom_screensaver/random.cpp
	kstyles/oxygen/config/main.cpp
	kstyles/oxygen/demo/main.cpp
	ksysguard/gui/ksysguard.cpp
	kwin/clients/oxygen/demo/main.cpp
	kwin/kcmkwin/kwincompositing/kwincompositing.desktop
	kwin/tabbox/qml/clients/text/metadata.desktop
	kwin/tabbox/qml/clients/window_strip/metadata.desktop
	libs/plasmagenericshell/widgetsexplorer/package/metadata.desktop
	plasma/desktop/applets/pager/package/metadata.desktop
	plasma/desktop/shell/activitymanager/package/metadata.desktop
	plasma/desktop/shell/data/layouts/org.kde.plasma-desktop.defaultPanel/contents/layout.js
	plasma/desktop/shell/desktopcorona.cpp
	plasma/desktop/shell/main.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/desktop/toolboxes/plasma-toolbox-paneltoolbox.desktop
	plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
	plasma/generic/applets/systemtray/protocols/fdo/fdographicswidget.cpp
	plasma/generic/applets/systemtray/protocols/fdo/fdographicswidget.h
	plasma/generic/applets/systemtray/protocols/fdo/x11embeddelegate.cpp
	plasma/generic/runners/nepomuksearch/plasma-runner-nepomuksearch.desktop
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
	plasma/netbook/shell/nettoolbox/plasma-toolbox-nettoolbox.desktop
	statusnotifierwatcher/statusnotifierwatcher.cpp
	systemsettings/app/main.cpp
2014-03-10 21:21:16 +01:00
Thomas Lübking 65f86baceb fix off-by-1 on multiscreen toppanel strutting 2014-02-24 20:12:24 +01:00
Thomas Lübking aecd5af0b4 fix sendToScreen for QuickTiled windows
two-fold issue
a) setMaximize implicitly sets QuickTileMaximize; setting it again toggles it off
b) setting quicktile mode needs to happen in keyboard mode and thenn the target
   still depends on the current windo position, so the untiled window needs to
   be in a sane location (while geom_restore will typically be off-screen when
   quick tiling by mouse)

BUG: 330819
FIXED-IN:4.11.7
REVIEW: 115521
2014-02-24 20:11:31 +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 a6b12108c9 Merge branch 'KDE/4.11'
Conflicts:
	kwin/clients/oxygen/config/oxygendetectwidget.cpp
2014-02-02 12:01:38 +01:00
Marek Marczykowski-Górecki 2ccf1bc3f0 kwin: fix handling of window size hints with PResizeInc
Use base_width/base_height if provided by the application and fallback to
min_width/min_height only if not (according to ICCCM 4.1.2.3).

This fixes long standing bug with shrinking gnome-terminal window.

REVIEW: 115396
2014-02-02 11:57:19 +01:00
Thomas Lübking ffaa9d336e Merge branch 'KDE/4.11'
Conflicts:
	kcontrol/workspaceoptions/workspaceoptions.desktop
	kwin/sm.cpp
2014-01-29 20:28:27 +01:00
Thomas Lübking edf0ed895f 1-pass change maximized <-> quicktiled geometry
REVIEW: 115307
2014-01-29 19:57:32 +01:00
Thomas Lübking 4bb88df714 Merge branch 'KDE/4.11' 2014-01-14 22:51:24 +01:00
Thomas Lübking 9de60604c0 properly reset quick_tile_mode on MaxRestore
BUG: 329864
FIXED-IN: 4.11.6
2014-01-14 22:28:50 +01:00
Thomas Lübking 3d389961ff preserve offsets when sending client to screen
for that purpose, move sendToScreen and updateLayer
functions from Workspace to Client, keep wrappers

BUG: 327361
FIXED-IN: 4.11.6
REVIEW: 114078
2014-01-14 22:28:46 +01:00
Thomas Lübking c4d014eb8c do not ask the deco for borders on every move
REVIEW: 114126
2014-01-14 22:24:38 +01:00
Thomas Lübking 03b23e21d9 fix shortcut driven quicktiling
1. swapping direction would rather toggle tiling
2. the next screen was calculated wrongly (found outmost)
3. the electrictborder geometry was not updated when swapping the mode on screen changes

BUG: 329136
FIXED-IN: 4.11.6
CCBUG: 222921
REVIEW: 114648
2014-01-14 22:23:09 +01:00
Martin Gräßlin d6a69aea4f [kwin] NETRootInfo::setDesktopGeometry doesn't expect a desktop argument any more 2013-11-18 13:57:06 +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 0056302652 [kwin] updateXTime before establishing grab for move resize mode
Grabbing the pointer failed causing unrestricted move resize to
operate incorrectly (position didn't update).
2013-11-13 11:28:05 +01:00
Bhushan Shah 935851a2b5 kDebug -> qDebug in kwin 2013-11-01 17:00:41 +05:30
Thomas Lübking 3594550b14 Merge branch 'KDE/4.11'
Conflicts:
	kwin/eglonxbackend.cpp
	kwin/glxbackend.cpp
2013-09-25 23:21:36 +02:00
Thomas Lübking cb88bc8848 keepInArea, client geometry containment condition
Since windows can place the decoration outside the screen
this needs to be still a valid condition when checking
whether we've to keep in area

In addition: calculate tx, ty and perform one move call
(include rule check and XMoveWindow unless there's a geometry
blocker ...)

BUG: 324792
FIXED-IN: 4.11.2
REVIEW: 112805
2013-09-25 23:09:18 +02:00
Thomas Lübking 4c170a2fdb snap to deco, not client on inner screen borders
client snapping is ultimately reasoned by fitt's law
and inner borders are not infinite

BUG: 323504
FIXED-IN: 4.11
REVIEW: 112103
2013-09-25 23:09:17 +02:00
Thomas Lübking feafbca941 Merge branch 'KDE/4.11' 2013-09-24 21:33:46 +02:00
Thomas Lübking 6303c8d573 sanitize user/fullscreenable condition
whether or not a window is maximizable does really not
matter (it's not if the size is locked, so the
maximized size is the only size) but only if the
window can take the fullscreen geometry.

otoh, the size restrictions (maximum size, fixed aspect)
should be honored by default but still ignorable by rule

BUG: 324733
FIXED-IN: 4.11.2
REVIEW: 112654
2013-09-24 21:30:49 +02:00
Martin Gräßlin 969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Martin Gräßlin 4576a0b6db Port last UngrabPointer to XCB 2013-09-10 15:30:11 +02:00
Martin Gräßlin 484c61a81e Use Window wrapper methods for manipulating the frame
And by that it's also mostly ported to XCB.
2013-09-10 15:30:10 +02:00
Martin Gräßlin ba7c5936fe Use Client::m_client instead of Toplevel::window() where useful
Allows to use .setGeometry() instead of XMoveResizeWindow.
2013-09-10 15:30:10 +02:00
Martin Gräßlin c616dd45fd Use xcb for move/resize the wrapper 2013-09-10 15:30:10 +02:00
Martin Gräßlin 4ddfd2d4ef Remove no longer needed includes from kwin/geometry.cpp 2013-09-09 06:03:35 +02:00
Thomas Lübking ef351070e7 snap max'd windows to maximize, not movement area
Because that's where it's placed. Notable esp. when there're panels on opposing sides.
Since snapping keeps max'd windows in position, it should preferably keep it in the proper position ;-)

REVIEW: 112322
2013-09-08 23:41:55 +02:00
Martin Gräßlin 211682ab67 KGlobalSettings::dndEventDelay() -> QApplication::startDragDistance() 2013-09-04 16:35:16 +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
Thomas Lübking 2568fcb149 guide partially max'd windows against corner snaps
BUG: 323598
FIXED-IN: 4.11.1
REVIEW: 112124
2013-08-27 07:53:02 +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 94e4a31370 Port from XLib XSync to xcb sync 2013-07-31 14:05:24 +02:00
Thomas Lübking 0f57c9407a depend titlebar protection dir pref on cap dir
when visualPixels is not 0, this means the titlebar does
not touch an upper/lower border, thus moving that direction
is ok and protection should be sought horizontally

BUG: 322507
FIXED-IN: 4.11
REVIEW: 111573
2013-07-19 21:16:15 +02:00
Thomas Lübking 02ed20662d prevent shrinking away titlebar f. bottom corners
it's the same condition as shriking away from plain edges
(one can resize exclusively in that direction as well)

REVIEW: 111573
2013-07-19 21:14:43 +02:00
Thomas Lübking eb647c7489 do not emit maximizeChange if mode didn't change
BUG: 321638
FIXED-IN: 4.11
REVIEW: 111262
2013-07-01 21:19:53 +02:00
Martin Gräßlin fa6b46ef30 Remove dead assignments
Variable deltaX and deltaY are assigned in the if-else branches, but not
read again after being set in the branches.
2013-06-26 17:58:43 +02:00
Thomas Lübking 725534471e exclude padding from snap delta of screen snap
using the actual delta this casewise causes false
preference for window snapping (less to move)
this restores the pre snap-to-content behavior
in that regard and delta isn't used for anything else.

BUG: 321325
FIXED-IN: 4.11
REVIEW: 111139
2013-06-26 12:42:10 +02:00
Thomas Lübking 774e3ec05b ignore desktops and splashes for snapping
Desktops cannot be resonably snapped or cause
implicit screen snapping and splashes are undemanded
short term clients

REVIEW: 111139
2013-06-26 12:42:10 +02:00
Thomas Lübking cf6acf84b9 deny configure requests to leave QuickTiling
similar to maximization blocking
also ensure the user can permit configure requests
for quick tiled and maximized windows

REVIEW: 111186
BUG: 321491
FIXED-IN: 4.11
2013-06-26 12:42:09 +02:00
Thomas Lübking e4d9ea9209 prevent NW resizing when window has fixed position
CCBUG: 320908
REVIEW: 110895
2013-06-10 16:37:46 +02:00
Thomas Lübking 516ea86341 block quick tiling unless actually moved
REVIEW: 109485
BUG: 289494
FIXED-IN: 4.11
2013-06-05 14:11:00 +02:00
Martin Gräßlin aa55cf98ae Port Client's move resize grab window to XCB
Using Xcb::Window to wrap this helper window and port all the used XLib
calls to XCB.

Also renaming the variable to m_ and camel case to follow general naming
scheme.
2013-05-28 11:55:38 +02:00