Sergio Martins
b13ba1e42e
Fix crash due to use of native widgets on Windows
...
Qt has corner cases when all of its widgets are native widgets.
This particular crash was a loop between QWidget::create()
and QWidget::createWinId().
2022-02-02 13:21:14 +00:00
Allen Winter
2fbe4f872e
Merge branch '1.5'
2022-01-20 08:15:23 -05:00
Allen Winter
93e60a743e
update copyright year
2022-01-20 08:05:26 -05:00
Sergio Martins
b20ce0895b
X11: Add support for robust z-order detection
...
Qt doesn't provide any way to know which window is directly
bellow the cursor. Generally this is fine since floating windows
are always on top of the main window. However, if Qt::Tool is removed,
then they can be behind, and KDDW can't know which window to overlay
the drop indicators onto.
This patch uses XLib's XQueryTree to solve this.
This is still experimental, hence disabled by default.
For now it's disabled by default, since it's experimental.
You can turn it on by passing -DKDDockWidgets_XLib=ON
Fixes bug #256
2021-11-25 20:59:16 +00:00
Allen Winter
dd9ec48979
DragController.cpp - fix multi-line comment [-Werror=comment]
...
caused by clang-format
2021-07-12 17:37:59 -04:00
Allen Winter
d87898b59e
private/DragController.cpp - don't include QWindow more than once
2021-07-12 17:04:15 -04:00
Sergio Martins
206433e430
Fix embedding in non-KDDW QMainWindow
...
Supports the case of having our KDDW MainWindow parented to another
main window. Was broken on Windows.
2021-06-14 06:43:06 +01:00
Sergio Martins
bb1b3c7b7b
Fix non-windows developer build
...
Build was complaining about unused function
2021-05-25 14:06:14 +01:00
Eism
0ab701bab6
qtquick: Fix detecting top level geometry
...
For QtQuick we want the QWindow geometry. For QtWidget it just works,
as the top level widget as the same geometry as the window, unlike
QQuickItem.
Fixes issue #199
2021-05-24 11:45:37 +01:00
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