Sergio Martins
7fb5a8d444
Merge branch '1.3'
2021-05-20 18:54:18 +01:00
Sergio Martins
913cc16371
Fix failing test on Windows due to the button hack
...
During tests, our mouse button isn't really pressed, as we
send fake press events. Only use the workaround in production.
2021-05-20 18:47:32 +01:00
Sergio Martins
d732be4e17
Merge branch '1.3' into master
2021-05-04 23:41:23 +01:00
Sergio Martins
18dbbb291a
Cancel drag when Qt doesn't detect that mouse was released
...
On Windows there can be a case where Qt doesn't receive the mouse
release event. When releasing very fast after starting the drag.
Fixes #166
2021-05-04 23:36:50 +01:00
Eism
99c0e99b26
Implemented the method for adjusting the position of a dragged item
2021-05-02 13:00:43 +01:00
Sergio Martins
633daf124e
Fix some warnings about shadowing methods
2021-03-09 15:43:36 +00:00
Sergio Martins
446560931b
MDI: Fix docked widget geometries not being remembered when floating
...
We shouldn't move the Frame directly. Instead, do it through the
layout, which will then remember the last docked geometry
2021-03-07 16:56:37 +00:00
Sergio Martins
d263ae649e
Allow to configure the MDI popup threshold
2021-03-03 16:33:32 +00:00
Sergio Martins
a37ab34fae
qtquick|MDI: When dragging don't trigger the resize drag handlers
...
MouseArea.enabled, even if false, will change the cursor shape.
So explicitly change the cursor to ArrowShape
2021-03-02 20:58:44 +00:00
Sergio Martins
ff67b9bcbc
Merge branch '1.3' into master
2021-02-26 15:20:32 +00:00
Sergio Martins
ba4a2eef5c
Also cancel a drag if we receive a non-client double click
2021-02-25 21:58:12 +00:00
Sergio Martins
f75c3a123e
Merge branch '1.3' into master
2021-02-17 17:44:05 +00:00
Sergio Martins
12dfe49d9b
Fix unused variable warning
2021-02-17 17:14:10 +00:00
Sergio Martins
545618964d
Only apply the async mouse compensation when undocking
...
Not needed when moving regular windows
2021-02-17 17:01:03 +00:00
Sergio Martins
544d3b026a
MDI windows will now poput into floating mode
...
when dragged behond the edges
Please enter the commit message for your changes. Lines starting
2021-02-13 18:30:59 +00:00
Sergio Martins
15ff882919
MDI: Raise window when we're dragging it
...
Otherwise it's appearing under others, possibly
2021-02-13 16:29:32 +00:00
Sergio Martins
18d405bdfb
MDI: Don't let windows escape its parent
2021-02-13 16:19:05 +00:00
Sergio Martins
a73f35af22
MDI: Implement internal move
...
You can now move internal windows around without them becoming
floating
2021-02-13 13:03:14 +00:00
Sergio Martins
a4d03c1514
Add a mdi-example
...
Don't want the main example to be too complex
2021-02-13 12:01:01 +00:00
Allen Winter
a421cb0b01
various - include private header first, remove header dupes
2021-02-07 07:07:49 -05:00
Sergio Martins
863691c313
Remove some private API from DockWidgetBase.h
...
Moved it into the pimpl
2021-02-06 16:32:13 +00:00
Sergio Martins
a6b9a82e9c
Fix crash when hosting QQuickWidget
...
There's no need to check if invisible widgets are candidates
for docking. There's usually no downside either, except that
QQuickWidget is very sensitive with when its platform window
is created, so don't force the creation.
Will cherry-pick to 1.2 if no regression is found
Fixes #150
2021-01-31 13:05:20 +00:00
Sergio Martins
d5b80b0bbd
Fix offset when dragging too fast
...
On Windows, when we start a drag, we switch to native dragging in
mid-flight, so that AeroSnap still works
Fixes #121
2021-01-19 22:23:20 +00:00
Sergio Martins
ae14e49338
Add a comment, explains why we switch to native drag
2021-01-19 21:53:35 +00:00
Sergio Martins
c23bce9829
Minor coding style: Remove nested ifdef
2021-01-19 21:50:31 +00:00
Sergio Martins
370d139dfc
Fix Flag_NativeTitleBar
...
It shouldn't use the FloatingWindow::isInDragArea() code path
2021-01-17 23:11:41 +00:00
Sergio Martins
d80325ec8f
Merge branch '1.2' into master
2021-01-10 23:11:17 +00:00
Sergio Martins
e9925785ab
Cancel the drag if the draggable is destroyed
...
Can be destroyed for reasons we can't control or simply destroyed
because the draggable was docked/undocked
Fixes #120
2021-01-10 23:07:57 +00:00
Sergio Martins
81efda2d11
Add a QPointer guard for the draggable
...
So we can detect if it was deleted meanwhile
2021-01-10 23:00:19 +00:00
Sergio Martins
4cceec82ac
Remove unused variable
...
Should fix MingW build with -Werror
2021-01-03 21:24:21 +00:00
Allen Winter
875544a449
Merge branch '1.2'
2021-01-02 09:32:20 -05:00
Allen Winter
a2f4c972a6
update copyright year
2021-01-02 09:27:50 -05:00
Sergio Martins
92063ab61b
Remove some duplicate code, Qt does the same already
...
Recently Qt implemented something similar. Since we only support
aero snap with Qt 5.15 we dont need KDDW's native win32 code anymore
cc issue #121
2020-12-28 13:06:37 -08:00
Jacob Young
0fe58fd160
Fix filename case so that it will build on a case-sensitive filesystem.
2020-12-28 12:34:03 +00:00
Jacob Young
e4502d4f64
Fix filename case so that it will build on a case-sensitive filesystem.
2020-12-28 03:07:30 -05:00
Sergio Martins
771bf10951
Merge branch '1.2'
2020-12-22 18:48:22 +00:00
Sergio Martins
cd859d6725
Fix a bunch of clazy warnings
2020-12-22 17:01:50 +00:00
Sergio Martins
6b846fcdff
qt6: Use more 'auto' to fix some Wconversion errors
2020-12-19 22:54:06 +00:00
Allen Winter
e41cdb6f78
various - fix misspellings
2020-12-16 16:49:22 -05:00
Sergio Martins
9a9488117c
Add a State dtor, fixes a -Wweak-vtables warning
2020-12-09 11:13:55 +00:00
Sergio Martins
89635d8b98
qt6: build is fixed now
2020-12-08 21:47:35 +00:00
Sergio Martins
f475312f11
qt6: Port away from QStateMachine
...
QStateMachine was moved to qtsxml module, which is not ported to
Qt6 yet.
We use QStateMachine for the semantics it gives us, not because of
its implementation. The implementation is trivial, so do it outselves.
We used very little from QStateMachine.
2020-12-08 19:55:52 +00:00
Sergio Martins
785db1b50c
qtquick: Fix detaching windows not working smoothly
...
Use the global event filter, as grabing isn't reliable in QtQuick.
Either not the same item is getting the mouse moves and release, or
it's because QtQuick internally is also setting/unsetting grabbers,
as seen in the source code
2020-12-01 20:14:46 +00:00
Sergio Martins
52bff59024
Remove duplicated logic regarding mouse events
2020-11-30 23:14:00 +00:00
Sergio Martins
bba0195196
Move "mouseEvent()" function to Utils_p.h
...
So it can be reused
2020-11-30 23:00:30 +00:00
Sergio Martins
60331fc654
qtquick: Remove some unneeded QtWidget includes
2020-11-29 17:57:14 +00:00
Sergio Martins
1d2a791dfc
qtquick: Fix DND operation never ending
...
When double-clicking a title bar we're getting: Press, Release,
Press and never the Release. We get the MouseDblClickEvent instead,
so handle that
2020-11-29 14:40:03 +00:00
Sergio Martins
5372920cd0
qtquick: Port NCHITTESTEventFilter
2020-11-26 21:53:48 +00:00
Sergio Martins
0980a7f601
qtquick: Port qtTopLevelForHWND() to Windows
...
Deals in QWindow instead of QWidget
2020-11-26 18:54:58 +00:00
Sergio Martins
b9962b3df0
qtquick: Make the QWinWidget case specific to QtWidgets
...
With QtQuick we don't have QWinWidget
2020-11-26 13:23:06 +00:00