Sergio Martins
73954d40ff
Fix aero-snap when there's native childs eating WM_NCHITTEST
2019-07-31 09:32:43 +01:00
Sergio Martins
990a98d7d9
Fix tests
...
Some QToolButtons are deleted later
2019-07-30 22:52:57 +01:00
Sergio Martins
aeba3a44f2
Fix build
2019-07-30 22:52:49 +01:00
Sergio Martins
f1b7fc2f89
DebugWindow: Debug if we receive nchittest messages
...
Debugging a case where we don't
2019-07-30 22:28:25 +01:00
Sergio Martins
a924970da6
Add debug code to send an hit test
2019-07-30 22:06:41 +01:00
Sergio Martins
a613aba6e6
Don't crash in qtoolbutton.cpp when unfloating
...
unfloating will trigger a deletion of the qtoolbutton which
is still in its event handler and will still dereference 'd'
2019-07-30 20:25:56 +01:00
Sergio Martins
a0ad09e616
aero-snap: Don't allow to drag FloatingWindow by clicking anywhere
...
Must drag via its TitleBar
2019-07-30 18:53:43 +01:00
Sergio Martins
2101e4be26
Aero-snap: Fix maximization behavior
...
- Maximized windows were being clipped
- Double click no longer maximizes
2019-07-30 18:41:37 +01:00
Sergio Martins
65953c2846
Fix title bar buttons not working with aero-snap
...
We can't return HTCAPTION for those.
Also fixes the used title bar geometry. It was using the geometry
of the hidden titlebar. Use actualTitleBar() instead.
2019-07-30 17:43:03 +01:00
Sergio Martins
5c4c836f30
Move aerosnap implementation into cpp file
2019-07-30 17:23:30 +01:00
Sergio Martins
39dd859584
Added a comment
2019-07-30 17:14:14 +01:00
Sergio Martins
918fceb66c
Cleanup
2019-07-30 17:12:39 +01:00
Sergio Martins
cdff9b3eaa
Some renaming
2019-07-30 16:59:29 +01:00
Sergio Martins
1e93160058
Remove some dead code from DockWidget
2019-07-30 16:57:26 +01:00
Sergio Martins
e53427a9fc
Only return HTCAPTION when clicking on the title bar
2019-07-30 16:48:29 +01:00
Sergio Martins
556df2b068
Only use the native event filter if aero snap is enabled
2019-07-30 16:21:23 +01:00
Sergio Martins
93a0377717
Don't allow to resize when clicking on the middle
...
It was using mCursorPos from previous invocations
2019-07-30 14:42:58 +01:00
Sergio Martins
9979696567
Fix being able to drag a FloatingWindow when dragging its body
...
We should only be able to drag via title bars, not widget
background.
This separates the concept of Draggable and Window, previously
they were mixed a bit. The draggable is something you drag,
usually a TitleBar, a Tab, or if using native window decorations
then FloatingWindow is also a draggable. Then, for each draggable
there's the actual window being dragged, that's always a FloatingWindow.
We should grab the mouse of the draggable.
2019-07-30 12:50:42 +01:00
Sergio Martins
80e98b32c3
Minor cleanup
2019-07-30 12:02:36 +01:00
Sergio Martins
6550939f0c
Fix typos
2019-07-30 11:00:54 +01:00
Sergio Martins
5854cd540a
Remove unused include
2019-07-30 10:26:00 +01:00
Sergio Martins
cdf0c88d45
Remove unneeded method
2019-07-30 10:14:53 +01:00
Sergio Martins
ed0cc44467
Simplify the drop/hover interfaces
...
Just pass FloatingWindow instead of Draggable. As we only drop
FloatingWindow.
2019-07-30 10:11:41 +01:00
Sergio Martins
42f2cc48b2
Simplify, remove unneeded code
...
Now that WindowBeingDragged deals only in terms of FloatingWindow.
2019-07-30 10:00:53 +01:00
Sergio Martins
316e3c8fd7
Simplify. DockWidget doesn't need to be a draggable
...
Floating dock widgets are FloatingWindow, and when docked
the draggable is the TitleBar, so this is dead code by now
2019-07-30 09:50:26 +01:00
Sergio Martins
f6a1d18d09
Add layout margins that were removed by mistake
2019-07-30 09:49:24 +01:00
Sergio Martins
d5faebb81c
Add support for aero-snap
2019-07-29 23:13:57 +01:00
Sergio Martins
1ed32283eb
Add a native resize handler for windows so we can have aero-snap
2019-07-29 22:21:15 +01:00
Sergio Martins
77a61aed23
Preserve Anchor position percentage after restore
2019-07-29 21:18:29 +01:00
Sergio Martins
7bcafb6ee3
Preserve anchor position percentage when restoring a maximized window
2019-07-29 20:31:51 +01:00
Sergio Martins
90cbd9731a
Fix anchors being out of bounds when consoming another multi splitter
...
dropping a multi splitter into another one wasn't honouring the bounds
of the donor's inner anchors
2019-07-29 18:54:09 +01:00
Sergio Martins
158c6157b5
Don't resize horizontal anchors when resizing window width
...
Similar for height
2019-07-29 18:53:29 +01:00
Sergio Martins
3c87d106ff
Actually remove the assert
2019-07-29 12:11:35 +01:00
Sergio Martins
a876249f13
Remove assert that can happen during a dumpDebug during restore
2019-07-29 12:07:06 +01:00
Sergio Martins
6fc9d48a9d
Don't warn if the current tab is -1
2019-07-29 11:33:47 +01:00
Sergio Martins
2b737ae6ad
Don't flicker when restoring
...
Only show the frame after it's parented
2019-07-29 11:01:06 +01:00
Sergio Martins
7400ae97de
Fix build
2019-07-28 21:13:31 +01:00
Sergio Martins
a69652a20a
DebugWindow: Add a way to repaint all windows
...
For debugging weird artifacts on MFC
2019-07-28 20:33:13 +01:00
Sergio Martins
d3256b5eb2
Fix linux build
2019-07-28 09:29:49 +01:00
Sergio Martins
13280dd01e
Also print Qt's version of the story
2019-07-27 20:16:24 +01:00
Sergio Martins
7f67349ab2
DebugWindow: Print native window rects
2019-07-27 20:00:14 +01:00
Sergio Martins
48e42b3247
Fix setContentSize() that was a no-op
...
Also, while restoring the layout don't resize the central widget
2019-07-27 19:09:27 +01:00
Sergio Martins
fd0b594331
Save the geometry of the actual top-level window
...
In case we have a main window embedded in another widget
2019-07-27 18:56:29 +01:00
Sergio Martins
1b249d68e9
Disable SeparatorWidget before the deleteLater
...
So we don't get an enterEvent
2019-07-27 11:35:12 +01:00
Sergio Martins
95f82cf8d7
Add assert
2019-07-27 11:26:03 +01:00
Sergio Martins
1f920a3aec
Add qDebug
2019-07-27 11:24:20 +01:00
Sergio Martins
73183a4fd5
Don't crash in a warning
2019-07-27 00:36:23 +01:00
Sergio Martins
a50683f400
Remove the Qt::WA_DontCreateNativeAncestors flag
...
IT doesn't fixes it completely
2019-07-27 00:06:47 +01:00
Sergio Martins
ab7f44f30a
DebugWindow: More debug helpers
2019-07-27 00:03:54 +01:00
Sergio Martins
5992114fc1
Allow to click on disabled widgets
2019-07-26 22:04:57 +01:00