Commit Graph

982 Commits

Author SHA1 Message Date
Friedemann Kleint
288bf48388 idc: Do not link against QtGui.
(which throws off the build order).
2011-06-10 10:04:22 +02:00
Jørgen Lind
2aeefdddc1 Remove the platforms/install_rules directory 2011-06-10 09:54:12 +02:00
Jørgen Lind
f00f7a895b Update dependency list in xcb README 2011-06-10 09:46:56 +02:00
Jørgen Lind
6ee65dc478 QtPlatformSupport: A helper library for platform plugins
QtPlatformSupport is a static library. Platform plugins are meant to
link against this library to pull in dependencies such as fontengines
and convenience functions for finding the right GL configs. The linker
will only pull in the symbols used, so the size of the library doesn't
really matter
2011-06-10 09:46:56 +02:00
Morten Sorvig
17763a7b31 Actually add QEventDispatcherMac. 2011-06-10 09:26:16 +02:00
Samuel Rødal
4a189c188c QWindowContext / QWindowFormat refactor.
To enable having a single GL context used for multiple drawables we need
to de-couple the context class a bit more from the window class in the
plugin API. Now contexts are created stand-alone based on a GL format
and a share context, and when calling makeCurrent() a desired surface
is specified. This maps well to GLX, EGL, Cocoa, AGL, and WGL, which all
support this use case.

QWindowContext is renamed to QGuiGLContext, and QWindowFormat is renamed
to QGuiGLFormat. We have the ability to introduce a pbuffer or similar
other offscreen GL drawable abstraction in the future.
2011-06-10 09:24:56 +02:00
Laszlo Agocs
4d10e64f2a Use XLookupString for translating key events.
There seems to be no easy equivalent in the XCB world and the
fallback we currently have is really incomplete. Hence we will
call XLookupString with a fake XKeyEvent if XCB_USE_XLIB is
enabled.

Reviewed-by: Samuel Rødal
2011-06-09 16:49:03 +02:00
Morten Sorvig
e3410908a2 Add QEventDispatcherMac.
Create it directly in QGuiApplication for now, 
later on we'll move it to the cocoa plugin.
2011-06-09 11:19:12 +02:00
Morten Sorvig
0a4c2eae4b Remove QPlatformEventLoopIntegration.
Instead we'll let the platform plugins construct
an QEventDispatcherQPA subclass. This API will be
added later on.

This temporarily breaks cocoa, uikit and opencode.
2011-06-09 11:19:12 +02:00
Laszlo Agocs
d88a773218 Bail out from cursor creation when malloc fails. 2011-06-09 11:08:05 +02:00
Laszlo Agocs
06c56cb464 Get modifier mapping using standard X, no need for libxkbcommon here.
Reviewed-by: Samuel Rødal
2011-06-09 11:01:35 +02:00
Laszlo Agocs
bd781231b2 Create custom cursors via XRender.
Reviewed-by: Samuel Rødal
2011-06-09 11:00:02 +02:00
Laszlo Agocs
4469de4ce7 Cursor support in xcb plug-in.
Custom cursor pixmaps with depth greater than 1 are not yet supported
and will be converted to monochrome always.

Reviewed-by: Samuel Rødal
2011-06-08 14:47:22 +02:00
Lars Knoll
88f3b059a9 Avoid out of bounds write
Reviewed-by: Samuel
2011-06-08 14:46:50 +02:00
Olli Werwolff
2d09fe38ac Undefine DrawText in qlineedit.cpp
There is a #define DrawText DrawTextW in winuser.h which is included
in windows.h so that the enum value in line 1981 is seen as DrawTextW
and thus is not a valid enum value on Windows.

Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:30 +02:00
Olli Werwolff
4b566e5db9 Most checks for windows in widgets have to be ws specific
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:29 +02:00
Olli Werwolff
affaefe049 use correct includes in qaccessible_win.cpp/qwizard_win_p.h
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:28 +02:00
Olli Werwolff
aecd41c070 Do not compile _win files when -qpa is used
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:27 +02:00
Olli Werwolff
a844e23607 QTextDocumentLayout has to be exported as it is used in widgets
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:26 +02:00
Olli Werwolff
9a3e1dba27 Fixed compilation with QT_NO_PRINTER
Reviewed-by: Samuel
Reviewed-by: Lars Knoll
2011-06-08 13:57:25 +02:00
Lars Knoll
f2ff9036ae cosmetic changes 2011-06-08 13:46:09 +02:00
Lars Knoll
b6b244efda Fix behaviour after WM_TAKE_FOCUS
We should not call requestActivateWindow() in
reaction to WM_TAKE_FOCUS. Looks like it should
only be done if the focus should in fact go
to a modal child of the widget.
2011-06-08 11:44:41 +02:00
Olli Werwolff
819f9ca965 Use Q_WIDGETS_EXPORT for widgets library
Reviewed-by: Lars Knoll
2011-06-08 10:43:55 +02:00
Lars Knoll
6a243e5559 revert accidental commit 2011-06-07 16:45:28 +02:00
Lars Knoll
1729785d1e remove unused code 2011-06-07 16:44:23 +02:00
Lars Knoll
52e5fd336b cleanups code
Make QXcbClipboard and QXcbDrag a QXcbObject to simplify
the code.
Use the predefined atoms in xproto.h instead of our own
defines.
2011-06-07 16:29:35 +02:00
Lars Knoll
4386425ce3 Implement QDropEvent::source() again
QDropEvent::source() now returns a QObject
instead of a widget, matching the implementation
in QDrag.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
71304aefd0 reset certain global variables on deletion
qt_button_down needs to be reset to 0 if it
points to the widget being deleted.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
779e1aaa35 Protect against deleted windows
Check that the window is still there before
trying to deliver an event to it.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
689ac3631d Initialize variable
Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
1928e633a5 Fix some remaining issues with DnD
Do not set the event mask of the window
we drop onto to NO_EVENT. Always use the
clipboards requestor window to convert
selections.

Reviewed-by: Samuel
2011-06-07 15:50:54 +02:00
Lars Knoll
ff53b1dcec add WM support class
Add a QXcbWMSupport class to better integrate with
NET_WM compliant window managers.

Suppport NET_WM_USER_TIME on windows.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Lars Knoll
c3f9de6296 Implement XDnD in the xcb plugin
Ported most of the code to support dragging
from qdnd_x11.cpp to xcb. Some features are still
not working 100% correct, but it's becoming
usable.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Lars Knoll
30b7c6512c X11 DnD implementation
Initial code for DnD on X11. Only Xdnd based,
Motif DnD is being ignored.

The code is currently limited to dropping
stuff onto the application. Starting drags
is not yet implemented.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Lars Knoll
92edbd2060 Add a startDrag to QPlatformDrag
This can be used to initialize data
when a drag starts. The Xdnd implementation
at least has a need for it.

Reviewed-by: Samuel
2011-06-07 15:50:53 +02:00
Morten Sorvig
28391442e7 Cocoa: Implement raise() and lower(). 2011-06-07 12:06:26 +02:00
Morten Sorvig
67f18cafcc Cocoa: Implement setWindowTitle. 2011-06-07 11:12:38 +02:00
Morten Sorvig
29b29d1b70 Fix Cocoa mouse position handling.
I'm not sure what "local" and "global" means for 
QWindowSystemInterface::handleMouseEvent. Sending
the mouse position in window coordinates for both
works.
2011-06-07 10:53:37 +02:00
Richard Moe Gustavsen
bc6f4d14f7 Buildfix for Mac OS
Since 'widgets' now is a separate library outside GUI, some
previously hidden symbols now needs to be exported. This patch
will make 'widgets' build.
2011-06-07 09:53:09 +02:00
Samuel Rødal
078e4ef6c7 Made tst_QWidget::updateWhileMinimized() pass.
This requires adding a couple of window system interface events, namely
Map, Unmap, and Expose. When a widget is minimized on X11 it is
unmapped, and thus update requests should not be delivered. Instead the
event will delivered when the widget is mapped, which causes an Expose
event to be sent. The Unmap and Expose event thus need to be handled in
QWidgetWindow, and Map is also added for the purpose of API symmetry
(and for future needs).
2011-06-06 16:03:38 +02:00
Samuel Rødal
481067453f Fixed warning about missing return in qmessagebox.cpp 2011-06-06 16:03:38 +02:00
Morten Sorvig
0bb276863f Set visibility state. 2011-06-06 14:49:13 +02:00
Jørgen Lind
fc9a648dc0 Make building of platform plugins indifferent if its out of source
This requires some source files to be shipped with the Qt install
They are now copied into QT_INSTALL_DATA/platform
2011-06-06 14:35:36 +02:00
Samuel Rødal
0273bc5d22 Made tst_QWidget::repaintWhenChildDeleted() pass.
Implement some missing functionality in QWidget::destroy().
2011-06-06 12:38:41 +02:00
Samuel Rødal
d75a9444aa Prevent tst_QWidget::showAndMoveChild() from failing on KDE.
Since we grab the desktop the KDE task bar appears on top of the window
we're interested in. It's preferable to make the window a bit smaller.
2011-06-06 12:38:41 +02:00
Laszlo Agocs
78264f333e Avoid setting the active window to null when there is a FocusIn queued. 2011-06-06 10:15:14 +02:00
Samuel Rødal
4f1a6ac732 Implemented QXcbScreen::topLevelAt(const QPoint &p).
This makes the tst_QWidget::widgetAt() auto-test pass.
2011-06-06 09:08:25 +02:00
Samuel Rødal
36b2c31ba8 Make XCB plugin work better in combination with auto-tests.
When an auto-test calls processEvents() indirectly via QTest::qWait(),
QAbstractEventDispatcher::aboutToBlock() doesn't get emitted since
the processEvents() implementation gets called without
the QEventLoop::WaitForMoreEvents flag set. Since the auto-tests depend
on all events getting delivered, we need to process the XCB events on
awake() as well.
2011-06-06 09:00:13 +02:00
Samuel Rødal
0ca326917a Made the tst_QWidget::widgetAt() test a bit more robust.
The QTRY_VERIFY() should include the whole test, not just whether we got
a widget or not, since it might be the wrong one.
2011-06-06 08:57:37 +02:00
Samuel Rødal
7e4116cc8a Basic QDesktopWidget support.
Makes it possible to use grabWindow on the desktop widget with the xcb
plugin, which gives us a few more passing tests in tst_QWidget.
2011-06-03 14:35:09 +02:00