summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Do not set input focus if WM supports _NET_ACTIVE_WINDOWMartin Gräßlin2014-02-091-2/+3
| | | | | | | | | | | | | | | | In case the window manager supports _NET_ACTIVE_WINDOW a client message is sent to the root window and the window manager is expected to either activate the window or mark it with demands attention. In addition the code unconditionally also called xcb_set_input_focus which breaks the intention of sending the client message. Thus it is now only done if the WM doesn't support the protocol. This was also the logic in Qt 4.x in QWidget::activateWindow (qwidget_x11.cpp). In addition set_input_focus is only called if the window is a toplevel. Change-Id: Iec4c02f0ea62db30a4b347d474fdfd2f05b8895b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make xcb compile with X-less EGL implementationsLaszlo Agocs2014-02-091-1/+1
| | | | | | | | | | | | On platforms like the Raspberry Pi the EGL implementation is not compatible with X. This means that while EGL and Open GL ES can be enabled, and will work fine with platform plugins like eglfs, EGL (and thus GL) should be automatically disabled in xcb, otherwise a compilation error will occur since xcb assumes the native handle types are the corresponding Xlib types. Task-number: QTBUG-36551 Change-Id: I2cc4c558abb4b25d422a2c01da9b75b865ace402 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Cocoa: Simplify native view access.Morten Johan Sørvig2014-02-084-7/+20
| | | | | | | | Use NSWindow and NSView accessors on QCocoaWindow instead of QGuiApplication and nativeResourceForWindow. Change-Id: Iabee1e42dd119726d932f89c66a90810463d70db Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Remove duplicate enum.Morten Johan Sørvig2014-02-081-5/+1
| | | | | Change-Id: I8a3b700710a1c47a31ddeed59ef73f1032ee7d09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* eglfs: Put Linux-specific includes within Q_OS_LINUX guards.Raphael Kubo da Costa2014-02-081-0/+2
| | | | | | | | This should fix the build on platforms like the BSDs, where linux/fb.h does not exist. Change-Id: Ia06403d71c3aaa0e177c85dcefa7986647777ae0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Post drag events for the window on which the drop site was registered.Friedemann Kleint2014-02-082-18/+6
| | | | | | | | | | | | | Remove findDragOverWindow(); no longer try to find the window under cursor since that would require synthesizing drag leave events. This is left to the DnD handling of QWidgetWindow, which searches the child which accepts drops. Task-number: QTBUG-33635 Change-Id: I844041bb862bb0382147be4e28f880a26843c453 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Refactor code registering/unregistering drop sites.Friedemann Kleint2014-02-082-36/+43
| | | | | | | | | | | | | | Only top level windows of certain types should be drop sites. Add code to update drop site registration to setParent(). This ensures the drop site is unregistered for example when winId() is invoked on a parentless widgets which is later inserted into a layout. Task-number: QTBUG-33635 Change-Id: Ia3161ecd59753f3f39d2a5967e9cb922cf0b9203 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Support --option in addition to -option for all builtin Qt commandline options.David Faure2014-02-081-12/+9
| | | | | | | | | | | | | | In addition to being more common and consistent with QCommandLineParser, this will make it possible to add the documentation for these options in the QCommandLineParser-generated help output. [ChangeLog][General] Builtin command-line options such as -reverse, -session, -style etc. now all support double dash, e.g. --reverse, --session, --style... Change-Id: Ia2e22c854ccc6a9d7b863b1234317005bc822191 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Cocoa: Option handling.Morten Johan Sørvig2014-02-083-2/+47
| | | | | | | | | | | | | | | | | | | | Add qt_mac_resolveOption(). Support setting options using either an environment variable or a QWindow property, with a default fallback value. The options are resolved with precedence in the mentioned order. Adds options for the following: NSView setWantsBestResolutionOPenGLSurface NSVIew setWantsLayer NSOpenGLContext NSOpenGLCPSurfaceOrder The window properties use the _q_mac_camelCase format. The environment variables use the QT_MAC_ALL_CAPS format. Change-Id: I1978a02d62e107a2120d81ffdd0f7b32f7731644 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Windows file dialog: Clean up thread manually.Friedemann Kleint2014-02-072-4/+29
| | | | | | | | | | Do not use deleteLater() to delete the thread. Task-number: QTBUG-36357 Change-Id: Ie7c87b92a7c73d5fbac01d4951d387ee2facd05c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Fix broken debug statement in qwindowsglcontext.cpp.Friedemann Kleint2014-02-071-1/+1
| | | | | Change-Id: Ifb26a7bb4461a88831459a17092944b068842d3e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Refactor and remove dead code, add property caching.Lorn Potter2014-02-077-2013/+606
| | | | | | | This helps with a flood of dbus messages due to properties. Change-Id: I7aa9d36a077d84a88dab561d007d597b0780e096 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* QPA: Introduce QPlatformWindow::normalGeometry().Friedemann Kleint2014-02-072-4/+26
| | | | | | | | | | | | | QWidgetWindow stores the normal geometry obtained from the widget when transiting to other states. This does not work reliably on Windows, where this geometry is already that of the new state. Instead, introduce QPlatformWindow::normalGeometry(), add implementation for Windows and use that in QWidgetWindow. Task-number: QTBUG-21371 Change-Id: I3819ebaf55b4e7d2f7eef1affe6c20712ba45d7c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Force surface repaint after is (re)created.BogDan Vatra2014-02-071-0/+1
| | | | | | | | | Every time when a surface is (re)created we must paint something in it otherwise it will appear black. Task-number: QTBUG-36594 Change-Id: Ib4baaef189f59a83a251cf89db30b0a3aec16d92 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Cocoa: Handle gracefully closing a window without event dispatcherGabriel de Dietrich2014-02-061-4/+7
| | | | | | | | Task-number: QTBUG-36696 Change-Id: I799eb351ee8ac1529cfbf009df3e7d57ec3a24ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* iOS: return correct uiview for IM rectanglesRichard Moe Gustavsen2014-02-061-0/+12
| | | | | | | | | | | UITextView has a property for specifying which UIView the CGRects you return should be aligned with. This makes a difference for widgets when not using alien, since then the view that draws the text will usually not be the same as the view that backs the top level QWindow. Change-Id: I240d63c98544c39308cd91465ee84351e7d7d1f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: be more specific about IM callbacks to iOSRichard Moe Gustavsen2014-02-061-11/+16
| | | | | | | | | No need to call textWillChange all the time if the text is really not changing. And report that selectionWillChange when Qt reports that it has changed. Change-Id: I7bd9f540cd9302c37888926a6152b803cc871ccb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: return styling hints for text correction pop-upsRichard Moe Gustavsen2014-02-061-0/+18
| | | | | | | | | | By returning the font used at the cursor position, the correction pop-up will be resized to match the point size, and the text marking will get correct height. Change-Id: I362579b793794835323bb9ceb5ddb4655526f392 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: send backspace events directlyRichard Moe Gustavsen2014-02-061-5/+7
| | | | | | | | | | | | | For legacy reasons, we send IM events to the focus object directly instead of through QPA. To be consistent, and to ensure that IM and key events end up at the same object in the same order, we need to send key events directly to the focus object as well. We should consider fixing up QPA to support IM events better, but this will do for now. Change-Id: I8a18a1f7b7295e5c64a109fb98eee928fae06a0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: send IM events instead of fake key eventsRichard Moe Gustavsen2014-02-061-12/+9
| | | | | | | | | | | | | | | Sending faked key events is not such a good idea, since: 1. We don't get key events on iOS, but text events 2. We cannot determine correct key code or modifiers, nor do we want to fake modifer press/release etc. 3. Android uses IM for all text input So it seems that the correct solution is to avoid sending key events in the first place. This will also bring the iOS port on par with the Android port. Change-Id: Ibac1d335184e62eb4185cfd4218a0ec73dffb2c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add spell checking supportRichard Moe Gustavsen2014-02-062-0/+3
| | | | | | | | | We don't have a separate enum just for spell checking in Qt, but Qt::ImhNoPredicitiveText should cover it. So use it to enable/disable both spell checking and auto completion. Change-Id: I7ad661cb7d720988f13bc1ed940573006c0ce229 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: implement support for input methodsRichard Moe Gustavsen2014-02-065-17/+420
| | | | | | | | This change will add support for input methods, word completion, spell checking and related functionality. Change-Id: I41d4de1cab521c679d414cfc7c1a2d0f9c1fcaaf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: move key/text input into separate categoryRichard Moe Gustavsen2014-02-064-104/+156
| | | | | Change-Id: I62c588226b307d51f7f88b1cc0c1e00c0d0f14c6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: move QUIView interface decl into separate header fileRichard Moe Gustavsen2014-02-063-26/+71
| | | | | Change-Id: Idc90d85859229d49b1deecc2472b330f0adb1ef8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: change logic for when to scroll screenRichard Moe Gustavsen2014-02-062-50/+76
| | | | | | | | | | | | | | | | | | | The current implementation will stop scrolling the screen to reveal the cursor if the input item changes transformation. This to not interfere with flicking etc. This strategy turns out to be too strict, as some qml apps/games can easily have small animations applied (e.g qtquick cork board example) that moves or scales the text areas (or their parents) upon focus. So instead of relying on input item transformation, we now scroll whenever the cursor changes position inside the input item (in addition to orientation changes etc). We also refactor scrollRootView into two functions, since we in many cases know if the keyboard should scroll up or down already when the call is made. Change-Id: If5bf349139eed69823cfc8986bb4b32c93bdf91b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Decrease code duplicationKonstantin Ritt2014-02-064-16/+8
| | | | | | | | Check engine's supported scripts in a single place and remove unused script parameter from fontEngine(). Change-Id: Ic153803bef519320c370b058e77eac1a4d92afd0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Emit ScreenChanged events on X11Allan Sandfeld Jensen2014-02-061-0/+10
| | | | | | | | | | | | | We do not currently emit screenchanged events when a window is moved to another screen on X11. This patch emits the event when a window no longer intersects with its current screen, and switches to the first intersecting screen. Change-Id: Ie40d6eb67b85bd961eeb348bc43e4f308ee22dba Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
* Cocoa: Add improved cursor updating code path.Morten Johan Sørvig2014-02-062-6/+22
| | | | | | | | | | | It's possible to use the cursorRect API in the cases where QCocoaWindow has a NSWindow. This is true for all top-level QCococaWindows today. Task-number: QTBUG-35659 Change-Id: Iefb2c1c022448e19a9c005a808e0c81abe9281ea Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Remove unused private member (fixes compilation with Clang 3.4)Thiago Macieira2014-02-062-2/+0
| | | | | | | qkmsscreen.h:114:18: error: private field 'm_refreshTime' is not used Change-Id: Id9c802c5c3ae2ffdf61238f083bfe875e7b613a8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Cocoa: Allow frameless NSWindow child QWindowsGabriel de Dietrich2014-02-053-48/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Showing, moving and resizing Contrarily to what an NSWindow does to its NSViews, child NSWindows need to be explicitly shown and hidden, and clipped if the parent NSWindow changes geometry. Also, hiding an NSWindow will not hide its child windows. This needed to be managed manually, adding 2 additional states to QCocoaWindow to reflect whether a child window has been clipped out by any ancestor geometry change, or hidden by any ancestor being hid. Also, ordering out an NSWindow will remove it fromm its parent's child windows array, making necessary to maintain a parallel list of child windows in QCocoaWindow. Stack order Although child NSWindows can be ordered relatively to each other, they need to be added again to be moved lower in the window stack. This also means the windows above it need to be added on top. Key (focus) status One of the remaining issues, is to make sure the top level window keeps the "key status" while still forwarding key events to the child window. Keeping same event propagation This use case is best illustrated with undocking QDockWidgets (if these are child NSWindows). The main issue is to make sure the QDockArea will get the mouse events right after undocking a dock widget. We used a similar workaround as the "key status" problem, and manually forward the mouse events to the dock area's QWindow. Manual test, by Morten Johan Sørvig, included. Task-number: QTBUG-33082 Task-number: QTBUG-22815 Change-Id: I50e34936fb82bff013e99f4bcb3bd0db0704c6ae Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QPrinter - Enable changing of Orientation on MacJohn Layt2014-02-051-12/+9
| | | | | | | | | | Since OSX 10.4 it has been possible to change the page orientation during a print job. Task-number: QTBUG-27630 Change-Id: Ic3c69e83afebbb9267ef6f435f968aeef2b72963 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngne - Fix PPK_CreatorJohn Layt2014-02-052-6/+7
| | | | | | | | Add support to the Mac and Windows print engines to preserve the creator name when switching between native and pdf format. Change-Id: Ie036af3140f24d8e34aa886f091384f93aa0157b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Fix PPK_CollateCopiesJohn Layt2014-02-052-8/+10
| | | | | | | | | | | | | | | | | Mac supports Collate Copies using native api, so add support. Note this is mostly only useful for setting the print dialog default, as Mac supports server-side multiple copies so the app will never need to collate the copies itself. Change PDF and Windows to default to collate true to match Mac as this is the behavior users expect. Task-number: QTBUG-27724 Task-number: QTBUG-35251 Task-number: QTBUG-22144 Change-Id: Ia43dbc260b3a71aa5b267cca54c168ffbea794fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Fix PPK_DocumentNameJohn Layt2014-02-051-8/+9
| | | | | | | | | | | | | | | | Add support to the Mac print engine for set/get the Document Name using the Job Name setting. Our documentation states this is one use that the document name will be put to so is appropriate to be used. Change the Windows print engine to default to a blank Docuemnt Name consistent with the other print engines. If still blank when printing then use a default value. Task-number: QTBUG-27724 Task-number: QTBUG-22144 Change-Id: If590811b5720e6f759eabc290b578b94e221f9f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrinter - Clean up Print Engine Key defaults and testsJohn Layt2014-02-051-10/+78
| | | | | | | | | | | | | | | | | | | | The PrintEngine keys are not consistently treated across the platforms and are not properly tested. Start the process of making the print engines behave consistently by documenting and testing the current behavior. Ensure all unsupported features return a consistent default value. The auto test for valuePreservation() has been flaky depending on the platform and installed printers so remove it and replace it with more complete testing. If no native printers available then don't test the native engines. Fixes for the individual inconsistent keys will follow. Task-number: QTBUG-26430 Change-Id: Iab914d7e0a5ae4a2cdc24c8645751f0910cf440c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Adds the ability to not have an activity on AndroidThierry Bastian2014-02-051-31/+43
| | | | | | | | | That code allows for not having an activity on Android. In my case I've made some java code to handle an Android service. The code is mainly about not dereferencing null pointers. Change-Id: Ia7fda03cbbc55e6afeacd928445a4b72b51c679e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Cocoa: Establish pattern for accessing globalsMorten Johan Sørvig2014-02-046-30/+50
| | | | | | | | | | Use a static QCocoaIntegration pointer instead of QGuiApplication. This removes the need to call out of the platform plugin as well as the casting from "platform" to "cocoa" types. Change-Id: If432b3567811223b73a67548e475e07d63635b73 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add suspend and resume event handling for WinRTMaurice Kalinowski2014-02-042-0/+39
| | | | | | | Task-number: QTBUG-35952 Change-Id: Icb4edb0f55c1d02dfbb5501df311b0fff87d2dc1 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Fix character mirroring issue with HarfBuzz-NGKonstantin Ritt2014-02-043-44/+6
| | | | | | | | | | HarfBuzz-NG does character mirroring where appropriate. A simple solution is to unset RightToLeft shaper flag when text gets shaped with HB-NG. Instead, move the mirroring code right to HB-old proxy function and decrease code duplication. Change-Id: Icdcd50b73b3e6a43da4b85addc7d8f51edf86512 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clean up QXCBSessionManagerSamuel Gaist2014-02-032-25/+2
| | | | | | | | | Removed useless overrides and inline simple functions. Change-Id: I69df0ec8446fe2c8bb904c7d4d9cc2e1d269533b Reviewed-by: Teo Mrnjavac <teo@kde.org> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Silence QWindowsOleDataObject::GetData().Friedemann Kleint2014-02-031-1/+1
| | | | | Change-Id: Iad97a35af334f951f56a7bf02ec1bf2873901aa1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* [QNX] Handle the case when an egl surface can not be createdFabian Bumberger2014-02-022-3/+5
| | | | | | | | | | If an egl surface can not be created (e.g. when out of memory) the application should not crash. In this case we will not be able to make the egl surface current and have to return false in the makeCurrent call in QQnxGlContext. Change-Id: If9b5a82a0f64dc0a42bee687d351bea43fb05d51 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* [QNX} Remove adjustBufferSize from the egl windowFabian Bumberger2014-02-026-12/+8
| | | | | | | | | | setGeometry will adjust the buffer for an egl window when a egl surface is created. Adjusting the buffer somewhere else can be potentially harmful. Another reason is that every egl window has a buffer on its own (unlike raster windows) so we do not have to check if we have to create a buffer after reparanting. Change-Id: I01406867a0dab598dac7d86e1f1e28ca9736a299 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* [QNX] Fix crash when creating eglSurfaceFabian Bumberger2014-02-021-2/+2
| | | | | Change-Id: I9cf9d56003a5f237dcf00b621fddf74e8d0ca190 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Move Direct2D paint engine on top of QPaintEngineExLouai Al-Khanji2014-01-313-468/+531
| | | | | | | | | | | | | | | | | Make QWindowsDirect2DPaintEngine a subclass of QPaintEngineEx instead of QPaintEngine like the other paint engines inside Qt. This should both be faster and better supported, as the code paths handling QPaintEngineEx in QPainter are tested more. Additionally the visual output is closer to the raster engine, as all primitives are drawn using the same mechanism, resulting in fewer off-by-one-pixel errors. This change also makes designer work mostly correctly, apart from some remaining clipping bugs. Change-Id: I53d36c08e73883ff35e389d57f9d30b482fc6721 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Cocoa: Merge QNSWindow and QNSPanel, inherit NSPanelGabriel de Dietrich2014-01-312-130/+99
| | | | | | | | | | | Since we will later have frameless NSWindow child QWindows, it makes sense to be able to keep and reuse the instantiated NSWindows in cases like QDockWidgets. If we keep these 2 different classes, it becomes impossible to morph one into the other. Task-number: QTBUG-33082 Change-Id: I351c628b887101b1cfd67689afbf689f119554de Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Windows: Fixed alert sound of QMessageBox.Friedemann Kleint2014-01-311-26/+21
| | | | | | | Task-number: QTBUG-33303 Change-Id: I184f169a2ae0e1fa5e21b906c1f7659316030b34 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* eglfs: Mouse hotplugging supportLaszlo Agocs2014-01-312-19/+1
| | | | | | | | | | | | | | On Embedded Linux with libudev support hotplugging was already working, except that the mouse cursor was not shown and hidden. This is now corrected so that the cursor disappears when all mice become disconnected and reappears if a mouse gets plugged in later on. [ChangeLog][QtGui] Mouse hotplugging is now fully supported in eglfs when running on Embedded Linux systems with libudev support enabled. Task-number: QTBUG-36374 Change-Id: Iec7c1557ba6085e3958dd357460cc032896fb174 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Disable the rendering profilingBogDan Vatra2014-01-311-2/+5
| | | | | Change-Id: Ia2d6216104c66a4b2e7bfb36418c13eaa51f55e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix the repaint position.BogDan Vatra2014-01-311-1/+1
| | | | | | | | The geometry is used to set the dirty region of the screen, so it must be translated in screen coordinates. Change-Id: Ic559a0a0d0e840cb2aa27ae1b02dcc140b29556f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>