Commit Graph

949 Commits

Author SHA1 Message Date
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
Samuel Rødal
a9910abac9 Remove tst_QWidget::painterRedirection().
We've removed support for painter redirection, QWidget::render() should
be used instead.
2011-06-03 14:01:19 +02:00
Laszlo Agocs
5f4faba583 Remove out-of-date TODOs. 2011-06-03 14:02:13 +02:00
Samuel Rødal
daa707ebf7 Prevent crash in QXcbIntegration::grabWindow().
Copy the image explicitly before calling QPixmap::fromImage().
2011-06-03 13:54:08 +02:00
Samuel Rødal
e99ab7de9b Implemented QXcbIntegration::grabWindow(). 2011-06-03 13:39:44 +02:00
Laszlo Agocs
1f456b4cbb Add support for mouse and keyboard grab.
Reviewed-by: Samuel Rødal
2011-06-03 11:59:15 +02:00
Samuel Rødal
7d9fcaccb1 Prevent crash in tst_QWidget::persistentWinId().
Only call createWinId() if we have a parent widget set.
2011-06-03 10:07:01 +02:00
Samuel Rødal
504ab89c6a Get rid of superfluous debug output in the xcb plugin. 2011-06-03 10:00:25 +02:00
Samuel Rødal
ac4276531c Made tst_QWidget::winIdChangeEvent() pass with Lighthouse.
We need to call setWinId() at appropriate times, and enable creation of
native handles for child widgets when createWinId() is called.
2011-06-03 10:00:25 +02:00
Jørgen Lind
17613b7add Merge branch 'refactor' of scm.dev.nokia.troll.no:qt/qtbase-staging into refactor 2011-06-01 16:00:16 +02:00
Jørgen Lind
d47246a7c6 Compile fix 2011-06-01 15:55:15 +02:00
Jørgen Lind
00ef07fe96 Merge remote-tracking branch 'base/master' into refactor
Conflicts:
	src/gui/embedded/qmousepc_qws.cpp
	src/gui/embedded/qwslock.cpp
	src/plugins/decorations/default/default.pro
	src/plugins/decorations/styled/styled.pro
	src/plugins/decorations/windows/windows.pro
	src/plugins/gfxdrivers/ahi/ahi.pro
	src/plugins/gfxdrivers/directfb/directfb.pro
	src/plugins/gfxdrivers/eglnullws/eglnullws.pro
	src/plugins/gfxdrivers/linuxfb/linuxfb.pro
	src/plugins/gfxdrivers/qvfb/qvfb.pro
	src/plugins/gfxdrivers/transformed/transformed.pro
	src/plugins/gfxdrivers/vnc/vnc.pro
	src/plugins/graphicssystems/meego/meego.pro
	src/plugins/graphicssystems/opengl/opengl.pro
	src/plugins/graphicssystems/openvg/openvg.pro
	src/plugins/graphicssystems/shivavg/shivavg.pro
	src/plugins/graphicssystems/trace/trace.pro
	src/plugins/kbddrivers/linuxinput/linuxinput.pro
	src/plugins/mousedrivers/linuxtp/linuxtp.pro
	src/plugins/mousedrivers/pc/pc.pro
	src/plugins/mousedrivers/tslib/tslib.pro
	src/plugins/platforms/minimal/minimal.pro
	tests/auto/qerrormessage/qerrormessage.pro
2011-06-01 15:34:58 +02:00
Laszlo Agocs
7c3e1e0ccd Have tooltips shown properly with xcb. 2011-06-01 15:32:58 +02:00
Samuel Rødal
e917c1d5aa Make tst_QWidget::ensureCreated() pass with -platform xcb.
We need the parent-creation logic to be enabled on QPA as well.
2011-06-01 14:28:49 +02:00
Shane Kearns
7b6c3707de sockets: limit buffer size of the internal sockets in proxy engines
The application can normally control the amount of buffering of a
socket or QNetworkReply by using the setReadBufferSize API.
This allows the application to flow control the TCP connection, and
avoids out of memory errors when the data being downloaded is received
faster than the application can process it.

However when using a proxy, the proxy socket engine has an internal
socket which is used to communicate with the proxy server. It is not
visible to the user, and does not have awareness of the buffer size of
the external socket.

To solve this, we limit the internal sockets' buffer size to 64k bytes.
Under normal operation, the data is swiftly copied to the external
socket where the buffer can grow (or not) based on the application's
set value for read buffer size.

Task-number: QT-4966
Reviewed-by: Markus Goetz
(cherry picked from commit c4727a85eed57a4db698326a1bed4aa75b6e5284)

Change-Id: I29e6628e38b79b41c4464ba8cb772a0f03717043
Reviewed-on: http://codereview.qt.nokia.com/153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Markus Goetz
2011-06-01 13:38:06 +02:00
Samuel Rødal
f05236a40d Prevent XSetInputFocus BadMatch errors.
The BadMatch errors are generated if XSetInputFocus is called before the
window has been mapped, so we need to set a flag when we get the map
notify event.
2011-06-01 13:37:44 +02:00
Laszlo Agocs
ead7c1c33c Start using libxkbcommon in the xcb plug-in. 2011-06-01 11:01:32 +02:00
Laszlo Agocs
646fcc1bd3 Do not choke on zero-sized windows.
Configure requests with zero width or height will always
fail with BadValue and have to be avoided. Same goes for
shm segments of size 0.
2011-06-01 11:01:32 +02:00
Lars Knoll
38745b341c add a platform interface for DnD
Use the simple in process DnD implementation
for xcb.
2011-06-01 09:55:39 +02:00
Lars Knoll
07f8aecb52 Clean up DnD code
Some cleanups of the DnD code to prepare for
creating a platform API.
2011-06-01 09:55:39 +02:00
Andrew den Exter
50b77ef0b0 Make TextEdit word selection more natural.
QTextControl will only extend the selection to a word if the cursor is
directly over it which prevents the selection being extended if the
mouse is dragged up or down a to a shorter line of text making it
difficult to select multiple lines of text.  Just disable that
limitation when the TextEdit word selection is enabled.

Change-Id: I3b9d1575c0141db8441197d740de94a90eacc077
Task-number: QTBUG-19230
Reviewed-by: Martin Jones
Reviewed-on: http://codereview.qt.nokia.com/292
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-06-01 09:36:15 +02:00
Andrew den Exter
16bd22b1bc Ensure the TextEdit cursor delegate is repositioned on mouse events.
Update the micro focus when a mouse press changes the cursor position
of a read only TextEdit.

Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46
Task-number: QTBUG-19109
Reviewed-by: Martin Jones
Reviewed-on: http://codereview.qt.nokia.com/291
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-06-01 08:04:58 +02:00
Andrew den Exter
3c7793acc0 Don't crash on an invalid replacementStart from an input method.
Ensure the cursor position does not exceed the bounds of the
current text.

Change-Id: If38f7729372562324d11eadd1a976c0c6da91863
Task-number: QTBUG-19054
Reviewed-by: Martin Jones
(cherry picked from commit 6fbfb1ab3f26ad672eb24f9b4a0ce1a8eea08298)
Reviewed-on: http://codereview.qt.nokia.com/290
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2011-06-01 06:55:27 +02:00
Bernhard Rosenkraenzer
15871d606a Fix build in C++0x mode
This fixes compiler errors (gcc 4.6 -std=gnu++0x on x86_64 Linux):

embedded/qwslock.cpp: In function `bool forceLock(int, int, int)':
embedded/qwslock.cpp:121:39: error: narrowing conversion of `semNum'
        from `int' to `short unsigned int' inside { } [-fpermissive]

(and equivalent errors in other lines/files)

See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
Section 8.5.4/6

Change-Id: I2cbac5482b87f33287a416af5a5c9bde621720bc
Reviewed-By: Olivier Goffart
Merge-Request: 1240
Reviewed-on: http://codereview.qt.nokia.com/275
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
2011-05-31 17:46:40 +02:00
Samuel Rødal
bf8dfc394a Remove some QWidget autotest that have become irrelevant with -qpa.
We can't use windowing system specific checks on Lighthouse because the
windowing system is now plugin-dependent.
2011-05-31 16:32:08 +02:00
Jørgen Lind
d0beb0d95b Fix the egl path for xcb and wayland plugins
Reviewed-by: Samuel Rødal
2011-05-31 15:57:03 +02:00
Laszlo Agocs
9bd270f64d Have a sensible default double click interval.
Having 0 as default would disable double clicks completely which
is not really good.

Reviewed-by: Samuel Rødal
2011-05-31 14:18:47 +02:00
Laszlo Agocs
bc75a8963e Fix for excess creation of QWindow instances.
topData() is called from various functions for any kind of widgets,
not just for top-levels. Therefore createTLSysExtra cannot assume
that the widget is top-level. Previously QWindows were created
for desktop widget, toolbars, mdi subwindows, etc. which is
wrong. The patch will avoid this, and will also fix drawing
isses when dragging mdi windows.

Reviewed-by: Samuel Rødal
2011-05-31 13:50:30 +02:00
axis
a8814fcb69 Made qpluginbase.pri into a feature profile.
This enables other modules to use it without having access to the
QtBase sources.

Change-Id: I0a588b2e14ca88fa068c7c2bcc69ff669444f6c6
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/237
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-31 12:51:29 +02:00
axis
0b2ce85200 Moved certain qmake config variables to .qmake.cache.
The reason is that these are local to the build, and should not be
present inside the qmodule.pri file, because this file is installed.

Change-Id: I2207f2bf068b1aafd14e60d106c7028ca53d5efd
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/238
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-05-31 12:51:28 +02:00
Laszlo Agocs
7db1f8fc04 Fix QWidget::windowHandle().
The window member in extra should remain null for widgets
that do not have a native window. The change introduced
in an earlier commit is clearly wrong.
2011-05-31 12:36:46 +02:00
Friedemann Kleint
994b71253c New configure.exe binary: Qt 5 with QT3_SUPPORT removed. 2011-05-31 11:11:43 +02:00
Friedemann Kleint
83375db733 configure.exe: Remove QT3_SUPPORT.
As it is causing compile problems.
2011-05-31 11:10:44 +02:00
Friedemann Kleint
66febd27cb Windows: Bring back the HDC to the raster engine, Q_OS_WIN. 2011-05-31 10:48:36 +02:00