summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--LGPL_EXCEPTION.txt2
-rw-r--r--LICENSE.GPL674
-rw-r--r--LICENSE.LGPLv21 (renamed from LICENSE.LGPL)22
-rw-r--r--LICENSE.LGPLv3173
-rw-r--r--config.tests/brcm_egl/main.cpp8
-rw-r--r--config.tests/drm_egl_server/main.cpp8
-rw-r--r--config.tests/egl/main.cpp8
-rw-r--r--config.tests/glx/main.cpp8
-rw-r--r--config.tests/libhybris_egl_server/main.cpp6
-rw-r--r--config.tests/wayland/main.cpp18
-rw-r--r--config.tests/wayland_cursor/main.cpp8
-rw-r--r--config.tests/wayland_egl/main.cpp8
-rw-r--r--config.tests/wayland_scanner/main.cpp8
-rw-r--r--config.tests/wayland_scanner/scanner-test.xml8
-rw-r--r--config.tests/xcomposite/main.cpp8
-rw-r--r--config.tests/xkbcommon/main.cpp8
-rw-r--r--doc/global/qt-html-templates-offline.qdocconf45
-rw-r--r--doc/global/qt-module-defaults.qdocconf109
-rw-r--r--doc/global/style/offline.css622
-rw-r--r--examples/wayland/qml-compositor/ContrastEffect.qml8
-rw-r--r--examples/wayland/qml-compositor/WindowChrome.qml8
-rw-r--r--examples/wayland/qml-compositor/WindowContainer.qml8
-rw-r--r--examples/wayland/qml-compositor/compositor.js8
-rw-r--r--examples/wayland/qml-compositor/main.cpp13
-rw-r--r--examples/wayland/qml-compositor/main.qml8
-rw-r--r--examples/wayland/qwindow-compositor/compositorwindow.cpp8
-rw-r--r--examples/wayland/qwindow-compositor/compositorwindow.h8
-rw-r--r--examples/wayland/qwindow-compositor/main.cpp8
-rw-r--r--examples/wayland/qwindow-compositor/qwindowcompositor.cpp17
-rw-r--r--examples/wayland/qwindow-compositor/qwindowcompositor.h8
-rw-r--r--examples/wayland/qwindow-compositor/textureblitter.cpp8
-rw-r--r--examples/wayland/qwindow-compositor/textureblitter.h8
-rw-r--r--examples/wayland/server-buffer/client/main.cpp18
-rw-r--r--examples/wayland/server-buffer/client/serverbufferrenderer.cpp10
-rw-r--r--examples/wayland/server-buffer/client/serverbufferrenderer.h12
-rw-r--r--examples/wayland/server-buffer/compositor/main.cpp13
-rw-r--r--examples/wayland/server-buffer/compositor/qml/ServerBufferContainer.qml8
-rw-r--r--examples/wayland/server-buffer/compositor/qml/main.qml8
-rw-r--r--examples/wayland/server-buffer/compositor/serverbufferitem.cpp8
-rw-r--r--examples/wayland/server-buffer/compositor/serverbufferitem.h8
-rw-r--r--examples/wayland/server-buffer/compositor/serverbuffertextureprovider.h8
-rw-r--r--examples/wayland/server-buffer/share-buffer.xml8
-rw-r--r--qtwayland.pro4
-rw-r--r--src/3rdparty/protocol/wayland.xml336
-rw-r--r--src/3rdparty/protocol/xdg-shell.xml225
-rw-r--r--src/client/client.pro9
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegration.cpp42
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegration_p.h54
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp40
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h42
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp42
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h40
-rw-r--r--src/client/hardwareintegration/qwaylandhardwareintegration.cpp40
-rw-r--r--src/client/hardwareintegration/qwaylandhardwareintegration_p.h40
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegration.cpp40
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegration_p.h40
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp40
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h42
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp42
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h40
-rw-r--r--src/client/inputdeviceintegration/inputdeviceintegration.pri11
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h60
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp92
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h57
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp51
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h65
-rw-r--r--src/client/qwaylandabstractdecoration.cpp40
-rw-r--r--src/client/qwaylandabstractdecoration_p.h41
-rw-r--r--src/client/qwaylandbuffer_p.h41
-rw-r--r--src/client/qwaylandclientexport_p.h38
-rw-r--r--src/client/qwaylandclipboard.cpp40
-rw-r--r--src/client/qwaylandclipboard_p.h40
-rw-r--r--src/client/qwaylandcursor.cpp40
-rw-r--r--src/client/qwaylandcursor_p.h40
-rw-r--r--src/client/qwaylanddatadevice.cpp14
-rw-r--r--src/client/qwaylanddatadevice_p.h15
-rw-r--r--src/client/qwaylanddatadevicemanager.cpp39
-rw-r--r--src/client/qwaylanddatadevicemanager_p.h40
-rw-r--r--src/client/qwaylanddataoffer.cpp40
-rw-r--r--src/client/qwaylanddataoffer_p.h40
-rw-r--r--src/client/qwaylanddatasource.cpp40
-rw-r--r--src/client/qwaylanddatasource_p.h41
-rw-r--r--src/client/qwaylanddecorationfactory.cpp38
-rw-r--r--src/client/qwaylanddecorationfactory_p.h40
-rw-r--r--src/client/qwaylanddecorationplugin.cpp40
-rw-r--r--src/client/qwaylanddecorationplugin_p.h38
-rw-r--r--src/client/qwaylanddisplay.cpp63
-rw-r--r--src/client/qwaylanddisplay_p.h69
-rw-r--r--src/client/qwaylanddnd.cpp40
-rw-r--r--src/client/qwaylanddnd_p.h40
-rw-r--r--src/client/qwaylandeventthread.cpp40
-rw-r--r--src/client/qwaylandeventthread_p.h40
-rw-r--r--src/client/qwaylandextendedoutput.cpp41
-rw-r--r--src/client/qwaylandextendedoutput_p.h42
-rw-r--r--src/client/qwaylandextendedsurface.cpp40
-rw-r--r--src/client/qwaylandextendedsurface_p.h40
-rw-r--r--src/client/qwaylandinputcontext.cpp10
-rw-r--r--src/client/qwaylandinputcontext_p.h10
-rw-r--r--src/client/qwaylandinputdevice.cpp426
-rw-r--r--src/client/qwaylandinputdevice_p.h205
-rw-r--r--src/client/qwaylandintegration.cpp79
-rw-r--r--src/client/qwaylandintegration_p.h49
-rw-r--r--src/client/qwaylandnativeinterface.cpp66
-rw-r--r--src/client/qwaylandnativeinterface_p.h41
-rw-r--r--src/client/qwaylandqtkey.cpp40
-rw-r--r--src/client/qwaylandqtkey_p.h40
-rw-r--r--src/client/qwaylandscreen.cpp60
-rw-r--r--src/client/qwaylandscreen_p.h44
-rw-r--r--src/client/qwaylandshellsurface.cpp46
-rw-r--r--src/client/qwaylandshellsurface_p.h43
-rw-r--r--src/client/qwaylandshmbackingstore.cpp64
-rw-r--r--src/client/qwaylandshmbackingstore_p.h43
-rw-r--r--src/client/qwaylandshmwindow.cpp42
-rw-r--r--src/client/qwaylandshmwindow_p.h42
-rw-r--r--src/client/qwaylandsubsurface.cpp40
-rw-r--r--src/client/qwaylandsubsurface_p.h40
-rw-r--r--src/client/qwaylandtouch.cpp40
-rw-r--r--src/client/qwaylandtouch_p.h40
-rw-r--r--src/client/qwaylandwindow.cpp129
-rw-r--r--src/client/qwaylandwindow_p.h62
-rw-r--r--src/client/qwaylandwindowmanagerintegration.cpp40
-rw-r--r--src/client/qwaylandwindowmanagerintegration_p.h40
-rw-r--r--src/client/qwaylandwlshellsurface.cpp40
-rw-r--r--src/client/qwaylandwlshellsurface_p.h43
-rw-r--r--src/client/qwaylandxdgshell.cpp37
-rw-r--r--src/client/qwaylandxdgshell_p.h41
-rw-r--r--src/client/qwaylandxdgsurface.cpp152
-rw-r--r--src/client/qwaylandxdgsurface_p.h54
-rw-r--r--src/client/shellintegration/qwaylandshellintegration_p.h40
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationfactory.cpp38
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationfactory_p.h40
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationplugin.cpp40
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationplugin_p.h38
-rw-r--r--src/compositor/compositor_api/compositor_api.pri6
-rw-r--r--src/compositor/compositor_api/qwaylandbufferref.cpp39
-rw-r--r--src/compositor/compositor_api/qwaylandbufferref.h35
-rw-r--r--src/compositor/compositor_api/qwaylandclient.cpp174
-rw-r--r--src/compositor/compositor_api/qwaylandclient.h87
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp119
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.h39
-rw-r--r--src/compositor/compositor_api/qwaylanddrag.cpp6
-rw-r--r--src/compositor/compositor_api/qwaylanddrag.h6
-rw-r--r--src/compositor/compositor_api/qwaylandglobalinterface.cpp36
-rw-r--r--src/compositor/compositor_api/qwaylandglobalinterface.h34
-rw-r--r--src/compositor/compositor_api/qwaylandinput.cpp14
-rw-r--r--src/compositor/compositor_api/qwaylandinput.h17
-rw-r--r--src/compositor/compositor_api/qwaylandinputpanel.cpp6
-rw-r--r--src/compositor/compositor_api/qwaylandinputpanel.h6
-rw-r--r--src/compositor/compositor_api/qwaylandoutput.cpp257
-rw-r--r--src/compositor/compositor_api/qwaylandoutput.h168
-rw-r--r--src/compositor/compositor_api/qwaylandquickcompositor.cpp81
-rw-r--r--src/compositor/compositor_api/qwaylandquickcompositor.h48
-rw-r--r--src/compositor/compositor_api/qwaylandquickoutput.cpp70
-rw-r--r--src/compositor/compositor_api/qwaylandquickoutput.h66
-rw-r--r--src/compositor/compositor_api/qwaylandquicksurface.cpp79
-rw-r--r--src/compositor/compositor_api/qwaylandquicksurface.h37
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp127
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h57
-rw-r--r--src/compositor/compositor_api/qwaylandsurface_p.h40
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceinterface.cpp6
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceinterface.h6
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceitem.cpp78
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceitem.h16
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceview.cpp34
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceview.h34
-rw-r--r--src/compositor/global/qwaylandexport.h10
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegration.cpp8
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegration_p.h8
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp36
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h38
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp38
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h36
-rw-r--r--src/compositor/hardware_integration/qwlhwintegration.cpp8
-rw-r--r--src/compositor/hardware_integration/qwlhwintegration_p.h8
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegration.cpp8
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegration_p.h8
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp36
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h38
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp38
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h36
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor.cpp196
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor_p.h57
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevice.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevice_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwldataoffer.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwldataoffer_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwldatasource.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwldatasource_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwldisplay.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwldisplay_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedoutput.cpp12
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedoutput_p.h12
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedsurface.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedsurface_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlinputdevice.cpp10
-rw-r--r--src/compositor/wayland_wrapper/qwlinputdevice_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlinputmethod.cpp6
-rw-r--r--src/compositor/wayland_wrapper/qwlinputmethod_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwlinputmethodcontext.cpp6
-rw-r--r--src/compositor/wayland_wrapper/qwlinputmethodcontext_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwlinputpanel.cpp6
-rw-r--r--src/compositor/wayland_wrapper/qwlinputpanel_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwlinputpanelsurface.cpp12
-rw-r--r--src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h9
-rw-r--r--src/compositor/wayland_wrapper/qwlkeyboard.cpp13
-rw-r--r--src/compositor/wayland_wrapper/qwlkeyboard_p.h9
-rw-r--r--src/compositor/wayland_wrapper/qwllistener.cpp36
-rw-r--r--src/compositor/wayland_wrapper/qwllistener_p.h34
-rw-r--r--src/compositor/wayland_wrapper/qwloutput.cpp256
-rw-r--r--src/compositor/wayland_wrapper/qwloutput_p.h107
-rw-r--r--src/compositor/wayland_wrapper/qwlpointer.cpp13
-rw-r--r--src/compositor/wayland_wrapper/qwlpointer_p.h9
-rw-r--r--src/compositor/wayland_wrapper/qwlqtkey.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwlqtkey_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlqttouch.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwlqttouch_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlregion.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwlregion_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface.cpp65
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface_p.h12
-rw-r--r--src/compositor/wayland_wrapper/qwlsubsurface.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwlsubsurface_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface.cpp94
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface_p.h20
-rw-r--r--src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp14
-rw-r--r--src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwltextinput.cpp6
-rw-r--r--src/compositor/wayland_wrapper/qwltextinput_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwltextinputmanager.cpp6
-rw-r--r--src/compositor/wayland_wrapper/qwltextinputmanager_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwltouch.cpp19
-rw-r--r--src/compositor/wayland_wrapper/qwltouch_p.h10
-rw-r--r--src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp11
-rw-r--r--src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h8
-rw-r--r--src/extensions/brcm.xml8
-rw-r--r--src/extensions/drm-egl-server-buffer.xml8
-rw-r--r--src/extensions/hardware-integration.xml8
-rw-r--r--src/extensions/libhybris-egl-server-buffer.xml6
-rw-r--r--src/extensions/output-extension.xml8
-rw-r--r--src/extensions/qtkey-extension.xml8
-rw-r--r--src/extensions/server-buffer-extension.xml8
-rw-r--r--src/extensions/sub-surface-extension.xml8
-rw-r--r--src/extensions/surface-extension.xml8
-rw-r--r--src/extensions/touch-extension.xml8
-rw-r--r--src/extensions/windowmanager.xml8
-rw-r--r--src/extensions/xcomposite.xml8
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp40
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h45
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp40
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h40
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp40
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h40
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp40
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h41
-rw-r--r--src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp38
-rw-r--r--src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h39
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp68
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h46
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h42
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h38
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp45
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h43
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp61
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h46
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp40
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h40
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp40
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h40
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp40
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h40
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp40
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h40
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp40
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h40
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp40
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h40
-rw-r--r--src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp42
-rw-r--r--src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h42
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmbuffer.cpp8
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h8
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp8
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h8
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp11
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h8
-rw-r--r--src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp9
-rw-r--r--src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h6
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp10
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp12
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp10
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp8
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp12
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h8
-rw-r--r--src/plugins/decorations/bradient/main.cpp39
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/main.cpp42
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro3
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/main.cpp42
-rw-r--r--src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp40
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/main.cpp42
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp42
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro3
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp42
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp38
-rw-r--r--src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp38
-rw-r--r--src/plugins/hardwareintegration/compositor/libhybris-egl-server/main.cpp36
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp38
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp38
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp38
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/main.cpp42
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h40
-rw-r--r--src/plugins/platforms/qwayland-egl/main.cpp42
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h40
-rw-r--r--src/plugins/platforms/qwayland-generic/main.cpp42
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/main.cpp42
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h40
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/main.cpp42
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h44
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp40
-rw-r--r--src/shared/qwaylandmimehelper.cpp36
-rw-r--r--src/shared/qwaylandmimehelper.h38
-rw-r--r--src/shared/qwaylandshmformathelper.h130
-rw-r--r--tests/auto/client/mockcompositor.cpp36
-rw-r--r--tests/auto/client/mockcompositor.h36
-rw-r--r--tests/auto/client/mockinput.cpp36
-rw-r--r--tests/auto/client/mockinput.h36
-rw-r--r--tests/auto/client/mockoutput.cpp36
-rw-r--r--tests/auto/client/mockshell.cpp36
-rw-r--r--tests/auto/client/mocksurface.cpp36
-rw-r--r--tests/auto/client/mocksurface.h36
-rw-r--r--tests/auto/client/tst_client.cpp36
-rw-r--r--tests/auto/compositor/BLACKLIST2
-rw-r--r--tests/auto/compositor/compositor.pro4
-rw-r--r--tests/auto/compositor/mockclient.cpp50
-rw-r--r--tests/auto/compositor/mockclient.h42
-rw-r--r--tests/auto/compositor/mockseat.cpp48
-rw-r--r--tests/auto/compositor/mockseat.h50
-rw-r--r--tests/auto/compositor/testcompositor.cpp41
-rw-r--r--tests/auto/compositor/testcompositor.h38
-rw-r--r--tests/auto/compositor/testinputdevice.cpp62
-rw-r--r--tests/auto/compositor/testinputdevice.h57
-rw-r--r--tests/auto/compositor/testkeyboardgrabber.cpp34
-rw-r--r--tests/auto/compositor/testkeyboardgrabber.h36
-rw-r--r--tests/auto/compositor/tst_compositor.cpp121
350 files changed, 7459 insertions, 6671 deletions
diff --git a/.qmake.conf b/.qmake.conf
index f34c3589e..a98bcf66b 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.4.3
+MODULE_VERSION = 5.5.0
diff --git a/LGPL_EXCEPTION.txt b/LGPL_EXCEPTION.txt
index 7e2e30ff9..5cdacb9a4 100644
--- a/LGPL_EXCEPTION.txt
+++ b/LGPL_EXCEPTION.txt
@@ -1,4 +1,4 @@
-Digia Qt LGPL Exception version 1.1
+The Qt Company Qt LGPL Exception version 1.1
As an additional permission to the GNU Lesser General Public License version
2.1, the object code form of a "work that uses the Library" may incorporate
diff --git a/LICENSE.GPL b/LICENSE.GPL
deleted file mode 100644
index 94a9ed024..000000000
--- a/LICENSE.GPL
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/LICENSE.LGPL b/LICENSE.LGPLv21
index 3788d79e2..6e1846112 100644
--- a/LICENSE.LGPL
+++ b/LICENSE.LGPLv21
@@ -1,15 +1,15 @@
- GNU LESSER GENERAL PUBLIC LICENSE
+ GNU LESSER GENERAL PUBLIC LICENSE
- The Qt Toolkit is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt GUI Toolkit under the terms of
GNU Lesser General Public License version 2.1, which is displayed below.
-------------------------------------------------------------------------
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@@ -20,7 +20,7 @@
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -122,8 +122,8 @@ modification follow. Pay close attention to the difference between a
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
@@ -156,7 +156,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -442,7 +442,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -465,7 +465,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
diff --git a/LICENSE.LGPLv3 b/LICENSE.LGPLv3
new file mode 100644
index 000000000..8fbb74390
--- /dev/null
+++ b/LICENSE.LGPLv3
@@ -0,0 +1,173 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+
+ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
+
+ You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ GNU Lesser General Public License version 3, which is displayed below.
+
+-------------------------------------------------------------------------
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
+Everyone is permitted to copy and distribute verbatim copies of this
+licensedocument, but changing it is not allowed.
+
+This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+0. Additional Definitions.
+
+ As used herein, “this License” refers to version 3 of the GNU Lesser
+General Public License, and the “GNU GPL” refers to version 3 of the
+GNU General Public License.
+
+ “The Library” refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An “Application” is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A “Combined Work” is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the “Linked
+Version”.
+
+ The “Minimal Corresponding Source” for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The “Corresponding Application Code” for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort
+ to ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this
+ license document.
+
+4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that, taken
+together, effectively do not restrict modification of the portions of
+the Library contained in the Combined Work and reverse engineering for
+debugging such modifications, if you also do each of the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this
+ license document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of
+ this License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with
+ the Library. A suitable mechanism is one that (a) uses at run
+ time a copy of the Library already present on the user's
+ computer system, and (b) will operate properly with a modified
+ version of the Library that is interface-compatible with the
+ Linked Version.
+
+ e) Provide Installation Information, but only if you would
+ otherwise be required to provide such information under section 6
+ of the GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the Application
+ with a modified version of the Linked Version. (If you use option
+ 4d0, the Installation Information must accompany the Minimal
+ Corresponding Source and Corresponding Application Code. If you
+ use option 4d1, you must provide the Installation Information in
+ the manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.)
+
+5. Combined Libraries.
+
+ You may place library facilities that are a work based on the Library
+side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities, conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of
+ it is a work based on the Library, and explaining where to find
+ the accompanying uncombined form of the same work.
+
+6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+as you received it specifies that a certain numbered version of the
+GNU Lesser General Public License “or any later version” applies to
+it, you have the option of following the terms and conditions either
+of that published version or of any later version published by the
+Free Software Foundation. If the Library as you received it does not
+specify a version number of the GNU Lesser General Public License,
+you may choose any version of the GNU Lesser General Public License
+ever published by the Free Software Foundation.
+
+If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the Library.
+
diff --git a/config.tests/brcm_egl/main.cpp b/config.tests/brcm_egl/main.cpp
index ab554979f..5102ba661 100644
--- a/config.tests/brcm_egl/main.cpp
+++ b/config.tests/brcm_egl/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/drm_egl_server/main.cpp b/config.tests/drm_egl_server/main.cpp
index 7ac62bd6d..6552fe74e 100644
--- a/config.tests/drm_egl_server/main.cpp
+++ b/config.tests/drm_egl_server/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/egl/main.cpp b/config.tests/egl/main.cpp
index c349028ce..a47358e66 100644
--- a/config.tests/egl/main.cpp
+++ b/config.tests/egl/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/glx/main.cpp b/config.tests/glx/main.cpp
index 298b820ca..2d413e191 100644
--- a/config.tests/glx/main.cpp
+++ b/config.tests/glx/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/libhybris_egl_server/main.cpp b/config.tests/libhybris_egl_server/main.cpp
index 214bc537b..294889572 100644
--- a/config.tests/libhybris_egl_server/main.cpp
+++ b/config.tests/libhybris_egl_server/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/wayland/main.cpp b/config.tests/wayland/main.cpp
index 6094f0883..612f7a164 100644
--- a/config.tests/wayland/main.cpp
+++ b/config.tests/wayland/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -43,15 +43,15 @@
int main()
{
#if WAYLAND_VERSION_MAJOR < 1
-# error Wayland 1.2.0 or higher required
+# error Wayland 1.4.0 or higher required
#endif
#if WAYLAND_VERSION_MAJOR == 1
-# if WAYLAND_VERSION_MINOR < 2
-# error Wayland 1.2.0 or higher required
+# if WAYLAND_VERSION_MINOR < 4
+# error Wayland 1.4.0 or higher required
# endif
-# if WAYLAND_VERSION_MINOR == 2
+# if WAYLAND_VERSION_MINOR == 4
# if WAYLAND_VERSION_MICRO < 0
-# error Wayland 1.2.0 or higher required
+# error Wayland 1.4.0 or higher required
# endif
# endif
#endif
diff --git a/config.tests/wayland_cursor/main.cpp b/config.tests/wayland_cursor/main.cpp
index 299e2e3b2..e1a2bccc4 100644
--- a/config.tests/wayland_cursor/main.cpp
+++ b/config.tests/wayland_cursor/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/wayland_egl/main.cpp b/config.tests/wayland_egl/main.cpp
index 9899a0eb5..f79677cd1 100644
--- a/config.tests/wayland_egl/main.cpp
+++ b/config.tests/wayland_egl/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/wayland_scanner/main.cpp b/config.tests/wayland_scanner/main.cpp
index deb1bd0a9..5d20b5bf6 100644
--- a/config.tests/wayland_scanner/main.cpp
+++ b/config.tests/wayland_scanner/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/wayland_scanner/scanner-test.xml b/config.tests/wayland_scanner/scanner-test.xml
index 84913fd5e..86e20031f 100644
--- a/config.tests/wayland_scanner/scanner-test.xml
+++ b/config.tests/wayland_scanner/scanner-test.xml
@@ -2,8 +2,8 @@
<protocol name="scanner_test">
<!-- a dummy extension to test for wayland-scanner tool -->
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -19,8 +19,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/config.tests/xcomposite/main.cpp b/config.tests/xcomposite/main.cpp
index 316064a5a..11ba3b5a2 100644
--- a/config.tests/xcomposite/main.cpp
+++ b/config.tests/xcomposite/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/config.tests/xkbcommon/main.cpp b/config.tests/xkbcommon/main.cpp
index 801394c87..97162f3d0 100644
--- a/config.tests/xkbcommon/main.cpp
+++ b/config.tests/xkbcommon/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/doc/global/qt-html-templates-offline.qdocconf b/doc/global/qt-html-templates-offline.qdocconf
deleted file mode 100644
index 6e3177f50..000000000
--- a/doc/global/qt-html-templates-offline.qdocconf
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# A common HTML template for modules in this repository.
-# This template is common among the Qt 5 modules.
-#
-# A change in this template must be replicated in all of the repositories.
-#
-# We mean it.
-#
-
-HTML.templatedir = ../../../doc
-
-HTML.nobreadcrumbs = "true"
-
-HTML.stylesheets = global/style/offline.css
-
-HTML.headerstyles = \
- " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
-
-HTML.endheader = \
- "</head>\n" \
-
-HTML.footer = \
- "<div class=\"footer\">\n" \
- " <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2012 Digia Plc and/or its\n" \
- " subsidiaries. Documentation contributions included herein are the copyrights of\n" \
- " their respective owners.</p>\n" \
- " <br />\n" \
- " <p>\n" \
- " The documentation provided herein is licensed under the terms of the\n" \
- " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
- " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
- " <p>\n" \
- " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
- " www.qt-project.org</a>.</p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
- " in Finland and/or other countries worldwide. All other trademarks are property\n" \
- " of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
- "</div>\n" \
diff --git a/doc/global/qt-module-defaults.qdocconf b/doc/global/qt-module-defaults.qdocconf
deleted file mode 100644
index 48e9ae789..000000000
--- a/doc/global/qt-module-defaults.qdocconf
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# A common template for modules in this repository.
-# This template is common among the Qt 5 modules.
-#
-# A change in this template must be replicated in all of the repositories.
-#
-# We mean it.
-#
-
-codeindent = 1
-
-Cpp.ignoretokens = \
- QDBUS_EXPORT \
- QT_ASCII_CAST_WARN \
- QT_ASCII_CAST_WARN_CONSTRUCTOR \
- QT_BEGIN_HEADER \
- QT_BEGIN_INCLUDE_NAMESPACE \
- QT_BEGIN_NAMESPACE \
- QT_BOOTSTRAPPED \
- QT_DESIGNER_STATIC \
- QT_END_HEADER \
- QT_END_INCLUDE_NAMESPACE \
- QT_END_NAMESPACE \
- QT_FASTCALL \
- Q_AUTOTEST_EXPORT \
- Q_COMPAT_EXPORT \
- Q_CORE_EXPORT \
- Q_CORE_EXPORT_INLINE \
- Q_DBUS_EXPORT \
- Q_DECL_CONSTEXPR \
- Q_DECL_NOEXCEPT \
- Q_DECL_NOTHROW \
- Q_EXPORT \
- Q_EXPORT_PLUGIN \
- Q_EXPORT_PLUGIN2 \
- Q_GADGET \
- Q_GUI_EXPORT \
- Q_GUI_EXPORT_INLINE \
- Q_INLINE_TEMPLATE \
- Q_INVOKABLE \
- Q_NETWORK_EXPORT \
- Q_OPENGL_EXPORT \
- Q_OPENVG_EXPORT \
- Q_OUTOFLINE_TEMPLATE \
- Q_PRINTSUPPORT_EXPORT \
- Q_SQL_EXPORT \
- Q_SVG_EXPORT \
- Q_SCRIPT_EXPORT \
- Q_SCRIPTTOOLS_EXPORT \
- Q_WIDGETS_EXPORT \
- Q_XML_EXPORT \
- Q_XMLPATTERNS_EXPORT
-
-Cpp.ignoredirectives = \
- __attribute__ \
- QT_FORWARD_DECLARE_CLASS \
- Q_CLASSINFO \
- Q_DECLARE_INTERFACE \
- Q_DECLARE_METATYPE \
- Q_DECLARE_OPERATORS_FOR_FLAGS \
- Q_DECLARE_PRIVATE \
- Q_DECLARE_PUBLIC \
- Q_DECLARE_PRIVATE_D \
- Q_DECLARE_SHARED \
- Q_DECLARE_TR_FUNCTIONS \
- Q_DECLARE_TYPEINFO \
- Q_DISABLE_COPY \
- Q_DUMMY_COMPARISON_OPERATOR \
- Q_ENUMS \
- Q_FLAGS \
- Q_INTERFACES \
- Q_PRIVATE_PROPERTY
-
-defines = Q_QDOC \
- QT_.*_SUPPORT \
- QT_.*_LIB \
- QT_COMPAT \
- QT_KEYPAD_NAVIGATION \
- QT_NO_EGL \
- Q_OS_.* \
- Q_BYTE_ORDER \
- QT_DEPRECATED \
- QT_DEPRECATED_* \
- Q_NO_USING_KEYWORD \
- __cplusplus \
- Q_COMPILER_INITIALIZER_LISTS
-
-dita.metadata.default.author = Qt Project
-dita.metadata.default.permissions = all
-dita.metadata.default.publisher = Qt Project
-dita.metadata.default.copyryear = 2012
-dita.metadata.default.copyrholder = Nokia
-dita.metadata.default.audience = programmer
-
-naturallanguage = en_US
-outputencoding = UTF-8
-sourceencoding = UTF-8
-
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css"
-examples.imageextensions = "*.png *.jpg *.gif"
-
-headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
-sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
-
-versionsym = QT_VERSION_STR
-
diff --git a/doc/global/style/offline.css b/doc/global/style/offline.css
deleted file mode 100644
index 1b430ab90..000000000
--- a/doc/global/style/offline.css
+++ /dev/null
@@ -1,622 +0,0 @@
-body{
-font: normal 400 14px/1.2 Arial;
-margin-top:85px;
-font-family: Arial, Helvetica;
-color:#313131;
-text-align:justify;
-margin-left:5px;
-margin-right:5px;
-}
-
-img{
--moz-box-shadow: 3px 3px 3px #ccc;
--webkit-box-shadow: 3px 3px 3px #ccc;
-box-shadow: 3px 3px 3px #ccc;
-border:#8E8D8D 2px solid;
-margin-left:0px;
-max-width: 800px;
-height: auto
-}
-
-b{
-font-weight:600;
-}
-
-.content{}
-
-.descr{
-margin-top:35px;
-/*max-width: 75%;*/
-margin-left:5px;
-text-align:justify;
-min-height:700px;
-vertical-align:top;
-}
-
-.name{
-max-width: 75%;
-font-weight:100;
-}
-
-tt{
-text-align:left;}
-
-/*
------------
-links
------------
-*/
-
-a:link{
-color: #2C418D;
-text-decoration: none;
-text-align:left;
-}
-
-a:hover{
-color: #869CD1;
-text-decoration:underline;
-text-align:left;
-}
-
-a:visited{
-color: #869CD1;
-text-decoration: none;
-text-align:left;
-}
-
-a:visited:hover{
-text-decoration:underline;
-text-align:left;
-}
-
-a[href*="http://"], a[href*="ftp://"],a[href*="https://"]
-{
-text-decoration: none;
-background-image:url(../images/ico_out.png);
-background-repeat:no-repeat;
-background-position:left;
-padding-left:20px;
-text-align:left;
-}
-
-.flags{
-text-decoration:none;
-text-height:24px;
-}
-
-/*
--------------------------------
-NOTE styles
--------------------------------
-*/
-.notetitle, .tiptitle, .fastpathtitle{
-font-weight:bold;
-}
-
-.attentiontitle,.cautiontitle,.dangertitle,.importanttitle,.remembertitle,.restrictiontitle{
-font-weight:bold;
-}
-
-.note,.tip,.fastpath{
-background: #F2F2F2 url(../images/ico_note.png);
-background-repeat: no-repeat;
-background-position: top left;
-padding:5px;
-padding-left:40px;
-padding-bottom:10px;
-border:#999 1px dotted;
-color:#666666;
-margin:5px;
-}
-
-.attention,.caution,.danger,.important,.remember,.restriction{
-background: #F2F2F2 url(../images/ico_note_attention.png);
-background-repeat:no-repeat;
-background-position:top left;
-padding:5px;
-padding-left:40px;
-padding-bottom:10px;
-border:#999 1px dotted;
-color:#666666;
-margin:5px;
-}
-
-/*
--------------------------------
-Top navigation
--------------------------------
-*/
-
-.header{
-
-height:1px;
-padding:0px;
-margin:0px;
-}
-
-.qtref{
-display: block;
-position: relative;
-top: -76px;
-height:15px;
-z-index: 1;
-font-size:11px;
-padding-right:10px;
-float:right;
-}
-
-.naviNextPrevious{
-display: block;
-position: relative;
-text-align: right;
-top: -53px;
-float:right;
-height:20px;
-z-index:1;
-padding-right:10px;
-padding-top:2px;
-vertical-align:top;
-margin:0px;
-}
-
-
-.naviNextPrevious > a:first-child{
-background-image:url(../images/btn_prev.png);
-background-repeat:no-repeat;
-background-position:left;
-padding-left:20px;
-height:20px;
-padding-left:20px;
-}
-
-.naviNextPrevious > a:last-child{
-background-image:url(../images/btn_next.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-height:20px;
-margin-left:30px;
-}
-
-.breadcrumb{
-display: block;
-position: relative;
-top:-20px;
-/*border-top:2px solid #ffffff;*/
-border-bottom: 1px solid #cecece;
-background-color:#F2F2F2;
-z-index:1;
-height:20px;
-padding:0px;
-margin:0px;
-padding-left:10px;
-padding-top:2px;
-margin-left:-5px;
-margin-right:-5px;
-}
-
-.breadcrumb ul{
- margin:0px;
- padding:0px;
-}
-
-.breadcrumb ul li{
-background-color:#F2F2F2;
-list-style-type:none;
-padding:0;
-margin:0;
-height:20px;
-}
-
-.breadcrumb li{
-float:left;
-}
-
-.breadcrumb .first {
-background:url(../images/home.png);
-background-position:left;
-background-repeat:no-repeat;
-padding-left:20px;
-}
-
-
-.breadcrumb li a{
-color:#2C418D;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:25px;
-padding-left:10px;
-}
-
-.breadcrumb li a:hover{
-color:#909090;
-display:block;
-text-decoration:none;
-background:url(../images/arrow.png);
-background-repeat:no-repeat;
-background-position:right;
-padding-right:20px;
-padding-left:10px;
-}
-
-
-/* table of content
-no display
-*/
-
-/*
------------
-headers
------------
-*/
-
-
-@media screen{
-.title{
-color:#313131;
-font-size: 18px;
-font-weight: normal;
-left: 0;
-padding-bottom: 20px;
-padding-left: 10px;
-padding-top: 20px;
-position: absolute;
-right: 0;
-top: 0;
-background-color:#E6E6E6;
-border-bottom: 1px #CCC solid;
-border-top: 2px #CCC solid;
-font-weight:bold;
-margin-left:0px;
-margin-right:0px;
-}
-}
-
-h1 {
-margin: 0;
-}
-
-h2, p.h2 {
-font: 500 16px/1.2 Arial;
-font-weight:100;
-background-color:#F2F3F4;
-padding:4px;
-margin-bottom:30px;
-margin-top:30px;
-border-top:#E0E0DE 1px solid;
-border-bottom: #E0E0DE 1px solid;
-max-width: 99%;
-}
-
-h3{
-
-font: 500 14px/1.2 Arial;
-font-weight:100;
-text-decoration:underline;
-margin-bottom:30px;
-margin-top:30px;
-}
-
-h3.fn,span.fn{
-border-width: 1px;
-border-style: solid;
-border-color: #E6E6E6;
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
-border-radius: 7px 7px 7px 7px;
-background-color: #F6F6F6;
-word-spacing: 3px;
-padding: 5px 5px;
-text-decoration:none;
-font-weight:bold;
-max-width:75%;
-font-size:14px;
-margin:0px;
-margin-top:30px;
-
-}
-
-.name{
-color:#1A1A1A;
-}
-.type{
-color:#808080;
-}
-
-
-
-@media print {
-.title {
-color:#0066CB;
-font-family:Arial, Helvetica;
-font-size: 32px;
-font-weight: normal;
-left: 0;
-position: absolute;
-right: 0;
-top: 0;
-}
-}
-
-
-/*
------------------
-table styles
------------------
-*/
-.table img {
-border:none;
-margin-left:0px;
--moz-box-shadow:0px 0px 0px #fff;
--webkit-box-shadow: 0px 0px 0px #fff;
-box-shadow: 0px 0px 0px #fff;
-}
-
-/* table with border alternative colours*/
-
- table,pre{
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
- border-radius: 7px 7px 7px 7px;
-background-color: #F6F6F6;
-border: 1px solid #E6E6E6;
-border-collapse: separate;
-font-size: 12px;
-line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
-font-size: 12px;
-line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
-}
-
-
-table th{
-text-align:left;
-padding-left:20px;
-}
-
-table td {
-padding: 3px 15px 3px 20px;
-border-bottom:#CCC dotted 1px;
-}
-table p { margin:0px;}
-
-table tr.even {
-background-color: white;
-color: #66666E;
-}
-
-table tr.odd {
-background-color: #F6F6F6;
-color: #66666E;
-}
-
-
-table thead {
-text-align:left;
-padding-left:20px;
-background-color:#e1e0e0;
-border-left:none;
-border-right:none;
-}
-
-table thead th {
-padding-top:5px;
-padding-left:10px;
-padding-bottom:5px;
-border-bottom: 2px solid #D1D1D1;
-padding-right:10px;
-}
-
-
-/* table bodless & white*/
-
-.borderless {
-border-radius: 0px 0px 0px 0px;
-background-color: #fff;
-border: 1px solid #fff;
-}
-
-.borderless tr {
-background-color: #FFF;
-color: #66666E;
-}
-
-.borderless td {
-border:none;
-border-bottom:#fff dotted 1px;
-}
-
-/*
------------
-List
------------
-*/
-
-ul{
-padding-bottom:2px;
-}
-
-li {
-margin-bottom: 10px;
-padding-left: 8px;
-list-style:outside;
-list-style-type:square;
-text-align:left;
-}
-
-
-ol{
-margin:10px;
-padding:0;
-}
-
-ol > li{
-margin-left: 30px;
-padding-left:8px;
-list-style:decimal;
-}
-
-.centerAlign{
-text-align: left;
-}
-
-.cpp{
-display: block;
-margin: 10;
-overflow: hidden;
-overflow-x: hidden;
-overflow-y: hidden;
-padding: 20px 0 20px 0;
-}
-
-.footer{
-margin-top: 50px;
-padding-left:5px;
-margin-bottom: 10px;
-font-size:10px;
-border-top: 1px solid #999;
-padding-top:11px;
-}
-
-.footerNavi{
-width:auto;
-text-align:right;
-margin-top:50px;
-z-index:1;
-}
-
-.memItemLeft{
-padding-right: 3px;
-}
-
-.memItemRight{
-padding: 3px 15px 3px 0;
-}
-
-.qml{
-display: block;
-margin: 10;
-overflow: hidden;
-overflow-x: hidden;
-overflow-y: hidden;
-padding: 20px 0 20px 0;
-}
-
-.qmldefault{
-padding-left: 5px;
-float: right;
-color: red;
-}
-
-.qmlreadonly{
-padding-left: 5px;
-float: right;
-color: #254117;
-}
-
-.rightAlign{
-padding: 3px 5px 3px 10px;
-text-align: right;
-}
-
-/*
------------
-Content table
------------
-*/
-
-@media print{
-.toc {
-float: right;
-padding-bottom: 10px;
-padding-top: 50px;
-width: 100%;
-background-image:url(../images/bgrContent.png);
-background-position:top;
-background-repeat:no-repeat;
-}
-}
-
-@media screen{
-.toc{
-clear:both;
-float:right;
-vertical-align:top;
--moz-border-radius: 7px 7px 7px 7px;
--webkit-border-radius: 7px 7px 7px 7px;
-border-radius: 7px 7px 7px 7px;
- background:#FFF url(../images/bgrContent.png);
-background-position:top;
-background-repeat:repeat-x;
-border: 1px solid #E6E6E6;
-padding-left:5px;
-padding-bottom:10px;
-height: auto;
-width: 200px;
-text-align:left;
-z-index:2;
-margin-left:20px;
-margin-right:20px;
-margin-top:0px;
-padding-top:0px;
-}
-}
-
-.toc h3{
-text-decoration:none;
-}
-
-.toc h3{font: 500 14px/1.2 Arial;
-font-weight:100;
-padding:0px;
-margin:0px;
-padding-top:5px;
-padding-left:5px;
-}
-
-
-.toc ul{
-width:160px;
-padding-left:10px;
-padding-right:5px;
-padding-bottom:10px;
-padding-top:10px;
-}
-
-.toc ul li{
-margin-left:20px;
-list-style-image:url(../images/blu_dot.png);
-list-style:outside;
-
-}
-
-
-.toc ul li a:link{
-color: #2C418D;
-text-decoration: none;
-}
-
-.toc ul li a:hover{
-color: #869CD1;
-text-decoration:underline;
-
-}
-
-.toc ul li a:visited{
-color: #869CD1;
-font-weight: bold;
-}
-
-.level1{
-border:none;}
-
-.clearfix{
-clear:both;}
-
diff --git a/examples/wayland/qml-compositor/ContrastEffect.qml b/examples/wayland/qml-compositor/ContrastEffect.qml
index c284b2907..562d637e9 100644
--- a/examples/wayland/qml-compositor/ContrastEffect.qml
+++ b/examples/wayland/qml-compositor/ContrastEffect.qml
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qml-compositor/WindowChrome.qml b/examples/wayland/qml-compositor/WindowChrome.qml
index fe9f5d78d..5a29032da 100644
--- a/examples/wayland/qml-compositor/WindowChrome.qml
+++ b/examples/wayland/qml-compositor/WindowChrome.qml
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qml-compositor/WindowContainer.qml b/examples/wayland/qml-compositor/WindowContainer.qml
index 5e073298f..253daf7a9 100644
--- a/examples/wayland/qml-compositor/WindowContainer.qml
+++ b/examples/wayland/qml-compositor/WindowContainer.qml
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qml-compositor/compositor.js b/examples/wayland/qml-compositor/compositor.js
index f24d849c1..8baa2dd02 100644
--- a/examples/wayland/qml-compositor/compositor.js
+++ b/examples/wayland/qml-compositor/compositor.js
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qml-compositor/main.cpp b/examples/wayland/qml-compositor/main.cpp
index fcfec30b2..ab8589986 100644
--- a/examples/wayland/qml-compositor/main.cpp
+++ b/examples/wayland/qml-compositor/main.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -42,6 +43,7 @@
#include "qwaylandquicksurface.h"
#include <QtCompositor/qwaylandsurfaceitem.h>
+#include <QtCompositor/qwaylandoutput.h>
#include <QGuiApplication>
#include <QTimer>
@@ -60,7 +62,7 @@ class QmlCompositor : public QQuickView, public QWaylandQuickCompositor
public:
QmlCompositor()
- : QWaylandQuickCompositor(this, 0, DefaultExtensions | SubSurfaceExtension)
+ : QWaylandQuickCompositor(0, DefaultExtensions | SubSurfaceExtension)
, m_fullscreenSurface(0)
{
setSource(QUrl("main.qml"));
@@ -68,6 +70,7 @@ public:
setColor(Qt::black);
winId();
addDefaultShell();
+ createOutput(this, "", "");
connect(this, SIGNAL(afterRendering()), this, SLOT(sendCallbacks()));
}
diff --git a/examples/wayland/qml-compositor/main.qml b/examples/wayland/qml-compositor/main.qml
index a6b54c312..5c1a2a67f 100644
--- a/examples/wayland/qml-compositor/main.qml
+++ b/examples/wayland/qml-compositor/main.qml
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qwindow-compositor/compositorwindow.cpp b/examples/wayland/qwindow-compositor/compositorwindow.cpp
index 6f8f2321d..7d855016f 100644
--- a/examples/wayland/qwindow-compositor/compositorwindow.cpp
+++ b/examples/wayland/qwindow-compositor/compositorwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Wayland module
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qwindow-compositor/compositorwindow.h b/examples/wayland/qwindow-compositor/compositorwindow.h
index dc87b31a3..24c50c535 100644
--- a/examples/wayland/qwindow-compositor/compositorwindow.h
+++ b/examples/wayland/qwindow-compositor/compositorwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Wayland module
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qwindow-compositor/main.cpp b/examples/wayland/qwindow-compositor/main.cpp
index a0288982e..b4be143b5 100644
--- a/examples/wayland/qwindow-compositor/main.cpp
+++ b/examples/wayland/qwindow-compositor/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qwindow-compositor/qwindowcompositor.cpp b/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
index ab6722a0b..0b39f1102 100644
--- a/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
+++ b/examples/wayland/qwindow-compositor/qwindowcompositor.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -55,6 +56,7 @@
#include <QtCompositor/qwaylandinput.h>
#include <QtCompositor/qwaylandbufferref.h>
#include <QtCompositor/qwaylandsurfaceview.h>
+#include <QtCompositor/qwaylandoutput.h>
QT_BEGIN_NAMESPACE
@@ -109,7 +111,7 @@ public:
};
QWindowCompositor::QWindowCompositor(CompositorWindow *window)
- : QWaylandCompositor(window, 0, DefaultExtensions | SubSurfaceExtension)
+ : QWaylandCompositor(0, DefaultExtensions | SubSurfaceExtension)
, m_window(window)
, m_backgroundTexture(0)
, m_textureBlitter(0)
@@ -135,8 +137,7 @@ QWindowCompositor::QWindowCompositor(CompositorWindow *window)
setRetainedSelectionEnabled(true);
- setOutputGeometry(QRect(QPoint(0, 0), window->size()));
- setOutputRefreshRate(qRound(qGuiApp->primaryScreen()->refreshRate() * 1000.0));
+ createOutput(window, "", "");
addDefaultShell();
}
@@ -322,7 +323,7 @@ void QWindowCompositor::render()
// Draw the background image texture
m_textureBlitter->drawTexture(m_backgroundTexture->textureId(),
QRect(QPoint(0, 0), m_backgroundImage.size()),
- window()->size(),
+ m_window->size(),
0, false, true);
foreach (QWaylandSurface *surface, m_surfaces) {
diff --git a/examples/wayland/qwindow-compositor/qwindowcompositor.h b/examples/wayland/qwindow-compositor/qwindowcompositor.h
index 57f3e8536..cb70369c2 100644
--- a/examples/wayland/qwindow-compositor/qwindowcompositor.h
+++ b/examples/wayland/qwindow-compositor/qwindowcompositor.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qwindow-compositor/textureblitter.cpp b/examples/wayland/qwindow-compositor/textureblitter.cpp
index 813fd8966..a9acfc026 100644
--- a/examples/wayland/qwindow-compositor/textureblitter.cpp
+++ b/examples/wayland/qwindow-compositor/textureblitter.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/qwindow-compositor/textureblitter.h b/examples/wayland/qwindow-compositor/textureblitter.h
index 7426c6f29..b46d354e0 100644
--- a/examples/wayland/qwindow-compositor/textureblitter.h
+++ b/examples/wayland/qwindow-compositor/textureblitter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/server-buffer/client/main.cpp b/examples/wayland/server-buffer/client/main.cpp
index 54c586ce6..3f7a94d03 100644
--- a/examples/wayland/server-buffer/client/main.cpp
+++ b/examples/wayland/server-buffer/client/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -83,7 +83,7 @@ public:
return;
}
- QWaylandIntegration *wayland_integration = static_cast<QWaylandIntegration *>(QGuiApplicationPrivate::platformIntegration());
+ QtWaylandClient::QWaylandIntegration *wayland_integration = static_cast<QtWaylandClient::QWaylandIntegration *>(QGuiApplicationPrivate::platformIntegration());
m_server_buffer_integration = wayland_integration->serverBufferIntegration();
if (!m_server_buffer_integration) {
@@ -93,7 +93,7 @@ public:
}
- QWaylandDisplay *wayland_display = wayland_integration->display();
+ QtWaylandClient::QWaylandDisplay *wayland_display = wayland_integration->display();
struct ::wl_registry *registry = wl_display_get_registry(wayland_display->wl_display());
wl_proxy_set_queue(reinterpret_cast<struct wl_proxy *>(registry), wayland_display->wl_event_queue());
QtWayland::wl_registry::init(registry);
@@ -155,7 +155,7 @@ protected:
void share_buffer_cross_buffer(struct ::qt_server_buffer *buffer) Q_DECL_OVERRIDE
{
- QWaylandServerBuffer *serverBuffer = m_server_buffer_integration->serverBuffer(buffer);
+ QtWaylandClient::QWaylandServerBuffer *serverBuffer = m_server_buffer_integration->serverBuffer(buffer);
if (m_server_buffer_list.isEmpty()) {
setWidth(serverBuffer->size().width());
setHeight(serverBuffer->size().height());
@@ -168,8 +168,8 @@ protected:
}
private:
- QWaylandServerBufferIntegration *m_server_buffer_integration;
- QList<QWaylandServerBuffer *>m_server_buffer_list;
+ QtWaylandClient::QWaylandServerBufferIntegration *m_server_buffer_integration;
+ QList<QtWaylandClient::QWaylandServerBuffer *>m_server_buffer_list;
GLuint m_server_buffer_texture;
QOpenGLContext *m_context;
QOpenGLVertexArrayObject *m_vao;
diff --git a/examples/wayland/server-buffer/client/serverbufferrenderer.cpp b/examples/wayland/server-buffer/client/serverbufferrenderer.cpp
index 2f0d204d3..5c393e91c 100644
--- a/examples/wayland/server-buffer/client/serverbufferrenderer.cpp
+++ b/examples/wayland/server-buffer/client/serverbufferrenderer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -74,7 +74,7 @@ static const char fragment_shader[] =
" gl_FragColor = texture2D(textureSampler, uv);"
"}";
-ServerBufferRenderer::ServerBufferRenderer(QWaylandServerBuffer *serverBuffer)
+ServerBufferRenderer::ServerBufferRenderer(QtWaylandClient::QWaylandServerBuffer *serverBuffer)
: QOpenGLFunctions(QOpenGLContext::currentContext())
, m_server_buffer(serverBuffer)
, m_texture(0)
diff --git a/examples/wayland/server-buffer/client/serverbufferrenderer.h b/examples/wayland/server-buffer/client/serverbufferrenderer.h
index 7e8999b1c..146d3a99a 100644
--- a/examples/wayland/server-buffer/client/serverbufferrenderer.h
+++ b/examples/wayland/server-buffer/client/serverbufferrenderer.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -52,11 +52,11 @@ class QOpenGLShaderProgram;
class ServerBufferRenderer : public QOpenGLFunctions
{
public:
- ServerBufferRenderer(QWaylandServerBuffer *serverBuffer);
+ ServerBufferRenderer(QtWaylandClient::QWaylandServerBuffer *serverBuffer);
void render(const QMatrix4x4 &transform);
private:
- QWaylandServerBuffer *m_server_buffer;
+ QtWaylandClient::QWaylandServerBuffer *m_server_buffer;
GLuint m_texture;
QOpenGLVertexArrayObject *m_vao;
diff --git a/examples/wayland/server-buffer/compositor/main.cpp b/examples/wayland/server-buffer/compositor/main.cpp
index 6d408b1b7..312cff2c5 100644
--- a/examples/wayland/server-buffer/compositor/main.cpp
+++ b/examples/wayland/server-buffer/compositor/main.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -54,6 +55,7 @@
#include <QQuickView>
#include "qwayland-server-share-buffer.h"
+#include <QtCompositor/qwaylandoutput.h>
#include <QtCompositor/private/qwlcompositor_p.h>
#include <QtCompositor/private/qwlserverbufferintegration_p.h>
@@ -70,7 +72,7 @@ class QmlCompositor
public:
QmlCompositor()
- : QWaylandQuickCompositor(this, 0, DefaultExtensions | SubSurfaceExtension)
+ : QWaylandQuickCompositor(0, DefaultExtensions | SubSurfaceExtension)
, QtWaylandServer::qt_share_buffer(QWaylandCompositor::handle()->wl_display(), 1)
, m_server_buffer_32_bit(0)
, m_server_buffer_item_32_bit(0)
@@ -82,6 +84,7 @@ public:
setColor(Qt::black);
create();
grabWindow();
+ createOutput(this, "", "");
addDefaultShell();
connect(this, SIGNAL(afterRendering()), this, SLOT(sendCallbacks()));
diff --git a/examples/wayland/server-buffer/compositor/qml/ServerBufferContainer.qml b/examples/wayland/server-buffer/compositor/qml/ServerBufferContainer.qml
index 7c7306e36..e8ce19694 100644
--- a/examples/wayland/server-buffer/compositor/qml/ServerBufferContainer.qml
+++ b/examples/wayland/server-buffer/compositor/qml/ServerBufferContainer.qml
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/server-buffer/compositor/qml/main.qml b/examples/wayland/server-buffer/compositor/qml/main.qml
index c9d62be55..536065a6a 100644
--- a/examples/wayland/server-buffer/compositor/qml/main.qml
+++ b/examples/wayland/server-buffer/compositor/qml/main.qml
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/server-buffer/compositor/serverbufferitem.cpp b/examples/wayland/server-buffer/compositor/serverbufferitem.cpp
index 4a47c279d..96ceed0a1 100644
--- a/examples/wayland/server-buffer/compositor/serverbufferitem.cpp
+++ b/examples/wayland/server-buffer/compositor/serverbufferitem.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/server-buffer/compositor/serverbufferitem.h b/examples/wayland/server-buffer/compositor/serverbufferitem.h
index 31fad4e86..3add52c49 100644
--- a/examples/wayland/server-buffer/compositor/serverbufferitem.h
+++ b/examples/wayland/server-buffer/compositor/serverbufferitem.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/server-buffer/compositor/serverbuffertextureprovider.h b/examples/wayland/server-buffer/compositor/serverbuffertextureprovider.h
index 76ff5a4ac..c94a34e2e 100644
--- a/examples/wayland/server-buffer/compositor/serverbuffertextureprovider.h
+++ b/examples/wayland/server-buffer/compositor/serverbuffertextureprovider.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/examples/wayland/server-buffer/share-buffer.xml b/examples/wayland/server-buffer/share-buffer.xml
index 57a1fd2c5..ceb6b11fd 100644
--- a/examples/wayland/server-buffer/share-buffer.xml
+++ b/examples/wayland/server-buffer/share-buffer.xml
@@ -1,8 +1,8 @@
<protocol name="share_buffer">
<copyright>
- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/qtwayland.pro b/qtwayland.pro
index 7881a6c7a..88761497e 100644
--- a/qtwayland.pro
+++ b/qtwayland.pro
@@ -1,3 +1,5 @@
+requires(linux:!android)
+
load(configure)
qtCompileTest(wayland)
qtCompileTest(xkbcommon)
@@ -14,7 +16,7 @@ qtCompileTest(libhybris_egl_server)
load(qt_parts)
!config_wayland {
- warning("QtWayland requires Wayland 1.2.0 or higher, QtWayland will not be built")
+ warning("QtWayland requires Wayland 1.4.0 or higher, QtWayland will not be built")
SUBDIRS =
}
diff --git a/src/3rdparty/protocol/wayland.xml b/src/3rdparty/protocol/wayland.xml
index 1442b6a03..bf6acd1d0 100644
--- a/src/3rdparty/protocol/wayland.xml
+++ b/src/3rdparty/protocol/wayland.xml
@@ -4,6 +4,7 @@
<copyright>
Copyright © 2008-2011 Kristian Høgsberg
Copyright © 2010-2011 Intel Corporation
+ Copyright © 2012-2013 Collabora, Ltd.
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@ -38,12 +39,14 @@
The sync request asks the server to emit the 'done' event
on the returned wl_callback object. Since requests are
handled in-order and events are delivered in-order, this can
- used as a barrier to ensure all previous requests and the
+ be used as a barrier to ensure all previous requests and the
resulting events have been handled.
The object returned by this request will be destroyed by the
compositor after the callback is fired and as such the client must not
attempt to use it after that point.
+
+ The callback_data passed in the callback is the event serial.
</description>
<arg name="callback" type="new_id" interface="wl_callback"/>
</request>
@@ -54,7 +57,7 @@
to list and bind the global objects available from the
compositor.
</description>
- <arg name="callback" type="new_id" interface="wl_registry"/>
+ <arg name="registry" type="new_id" interface="wl_registry"/>
</request>
<event name="error">
@@ -169,7 +172,7 @@
<description summary="done event">
Notify the client when the related request is done.
</description>
- <arg name="serial" type="uint" summary="serial of the event"/>
+ <arg name="callback_data" type="uint" summary="request-specific data for the wl_callback"/>
</event>
</interface>
@@ -274,10 +277,73 @@
<enum name="format">
<description summary="pixel formats">
- This describes the memory layout of an individual pixel.
+ This describes the memory layout of an individual pixel.
+
+ All renderers should support argb8888 and xrgb8888 but any other
+ formats are optional and may not be supported by the particular
+ renderer in use.
</description>
<entry name="argb8888" value="0" summary="32-bit ARGB format"/>
<entry name="xrgb8888" value="1" summary="32-bit RGB format"/>
+ <!-- The drm format codes match the #defines in drm_fourcc.h.
+ The formats actually supported by the compositor will be
+ reported by the format event. -->
+ <entry name="c8" value="0x20203843"/>
+ <entry name="rgb332" value="0x38424752"/>
+ <entry name="bgr233" value="0x38524742"/>
+ <entry name="xrgb4444" value="0x32315258"/>
+ <entry name="xbgr4444" value="0x32314258"/>
+ <entry name="rgbx4444" value="0x32315852"/>
+ <entry name="bgrx4444" value="0x32315842"/>
+ <entry name="argb4444" value="0x32315241"/>
+ <entry name="abgr4444" value="0x32314241"/>
+ <entry name="rgba4444" value="0x32314152"/>
+ <entry name="bgra4444" value="0x32314142"/>
+ <entry name="xrgb1555" value="0x35315258"/>
+ <entry name="xbgr1555" value="0x35314258"/>
+ <entry name="rgbx5551" value="0x35315852"/>
+ <entry name="bgrx5551" value="0x35315842"/>
+ <entry name="argb1555" value="0x35315241"/>
+ <entry name="abgr1555" value="0x35314241"/>
+ <entry name="rgba5551" value="0x35314152"/>
+ <entry name="bgra5551" value="0x35314142"/>
+ <entry name="rgb565" value="0x36314752"/>
+ <entry name="bgr565" value="0x36314742"/>
+ <entry name="rgb888" value="0x34324752"/>
+ <entry name="bgr888" value="0x34324742"/>
+ <entry name="xbgr8888" value="0x34324258"/>
+ <entry name="rgbx8888" value="0x34325852"/>
+ <entry name="bgrx8888" value="0x34325842"/>
+ <entry name="abgr8888" value="0x34324241"/>
+ <entry name="rgba8888" value="0x34324152"/>
+ <entry name="bgra8888" value="0x34324142"/>
+ <entry name="xrgb2101010" value="0x30335258"/>
+ <entry name="xbgr2101010" value="0x30334258"/>
+ <entry name="rgbx1010102" value="0x30335852"/>
+ <entry name="bgrx1010102" value="0x30335842"/>
+ <entry name="argb2101010" value="0x30335241"/>
+ <entry name="abgr2101010" value="0x30334241"/>
+ <entry name="rgba1010102" value="0x30334152"/>
+ <entry name="bgra1010102" value="0x30334142"/>
+ <entry name="yuyv" value="0x56595559"/>
+ <entry name="yvyu" value="0x55595659"/>
+ <entry name="uyvy" value="0x59565955"/>
+ <entry name="vyuy" value="0x59555956"/>
+ <entry name="ayuv" value="0x56555941"/>
+ <entry name="nv12" value="0x3231564e"/>
+ <entry name="nv21" value="0x3132564e"/>
+ <entry name="nv16" value="0x3631564e"/>
+ <entry name="nv61" value="0x3136564e"/>
+ <entry name="yuv410" value="0x39565559"/>
+ <entry name="yvu410" value="0x39555659"/>
+ <entry name="yuv411" value="0x31315559"/>
+ <entry name="yvu411" value="0x31315659"/>
+ <entry name="yuv420" value="0x32315559"/>
+ <entry name="yvu420" value="0x32315659"/>
+ <entry name="yuv422" value="0x36315559"/>
+ <entry name="yvu422" value="0x36315659"/>
+ <entry name="yuv444" value="0x34325559"/>
+ <entry name="yvu444" value="0x34325659"/>
</enum>
<request name="create_pool">
@@ -521,7 +587,7 @@
<description summary="initiate drag-and-drop session">
This event is sent when an active drag-and-drop pointer enters
a surface owned by the client. The position of the pointer at
- enter time is provided by the x an y arguments, in surface
+ enter time is provided by the x and y arguments, in surface
local coordinates.
</description>
@@ -544,7 +610,7 @@
<description summary="drag-and-drop session motion">
This event is sent when the drag-and-drop pointer moves within
the currently focused surface. The new position of the pointer
- is provided by the x an y arguments, in surface local
+ is provided by the x and y arguments, in surface local
coordinates.
</description>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
@@ -577,7 +643,7 @@
<interface name="wl_data_device_manager" version="1">
<description summary="data transfer interface">
- The wl_data_device_manager is a a singleton global object that
+ The wl_data_device_manager is a singleton global object that
provides access to inter-client data transfer mechanisms such as
copy-and-paste and drag-and-drop. These mechanisms are tied to
a wl_seat and this interface lets a client get a wl_data_device
@@ -846,9 +912,9 @@
Set a class for the surface.
The surface class identifies the general class of applications
- to which the surface belongs. A common convention is to use
- the file name (full path if non-standard location) of the
- applications .desktop file as the class.
+ to which the surface belongs. A common convention is to use the
+ file name (or the full path if it is a non-standard location) of
+ the application's .desktop file as the class.
</description>
<arg name="class_" type="string"/>
</request>
@@ -890,7 +956,7 @@
<event name="popup_done">
<description summary="popup interaction is done">
The popup_done event is sent out when a popup grab is broken,
- that is, when the users clicks a surface that doesn't belong
+ that is, when the user clicks a surface that doesn't belong
to the client owning the popup surface.
</description>
</event>
@@ -952,10 +1018,10 @@
Destroying the wl_buffer after wl_buffer.release does not change
the surface contents. However, if the client destroys the
- wl_buffer before receiving wl_buffer.release, the surface
+ wl_buffer before receiving the wl_buffer.release event, the surface
contents become undefined immediately.
- Only if wl_surface.attach is sent with a NULL wl_buffer, the
+ If wl_surface.attach is sent with a NULL wl_buffer, the
following wl_surface.commit will remove the surface content.
</description>
@@ -1012,6 +1078,9 @@
The object returned by this request will be destroyed by the
compositor after the callback is fired and as such the client must not
attempt to use it after that point.
+
+ The callback_data passed in the callback is the current time, in
+ milliseconds.
</description>
<arg name="callback" type="new_id" interface="wl_callback"/>
@@ -1172,7 +1241,7 @@
</request>
</interface>
- <interface name="wl_seat" version="2">
+ <interface name="wl_seat" version="3">
<description summary="group of input devices">
A seat is a group of keyboards, pointer and touch devices. This
object is published as a global during start up, or when such a
@@ -1245,7 +1314,7 @@
</interface>
- <interface name="wl_pointer" version="1">
+ <interface name="wl_pointer" version="3">
<description summary="pointer input device">
The wl_pointer interface represents one or more input devices,
such as mice, which control the pointer location and pointer_focus
@@ -1294,6 +1363,10 @@
<arg name="hotspot_y" type="int" summary="y coordinate in surface-relative coordinates"/>
</request>
+ <request name="release" type="destructor" since="3">
+ <description summary="release the pointer object"/>
+ </request>
+
<event name="enter">
<description summary="enter event">
Notification that this seat's pointer is focused on a certain
@@ -1393,12 +1466,16 @@
</event>
</interface>
- <interface name="wl_keyboard" version="1">
+ <interface name="wl_keyboard" version="3">
<description summary="keyboard input device">
The wl_keyboard interface represents one or more keyboards
associated with a seat.
</description>
+ <request name="release" type="destructor" since="3">
+ <description summary="release the keyboard object"/>
+ </request>
+
<enum name="keymap_format">
<description summary="keyboard mapping format">
This specifies the format of the keymap provided to the
@@ -1476,7 +1553,7 @@
</event>
</interface>
- <interface name="wl_touch" version="1">
+ <interface name="wl_touch" version="3">
<description summary="touchscreen input device">
The wl_touch interface represents a touchscreen
associated with a seat.
@@ -1488,6 +1565,10 @@
contact point can be identified by the ID of the sequence.
</description>
+ <request name="release" type="destructor" since="3">
+ <description summary="release the touch object"/>
+ </request>
+
<event name="down">
<description summary="touch down event and beginning of a touch sequence">
A new touch point has appeared on the surface. This touch point is
@@ -1720,4 +1801,225 @@
</interface>
+ <interface name="wl_subcompositor" version="1">
+ <description summary="sub-surface compositing">
+ The global interface exposing sub-surface compositing capabilities.
+ A wl_surface, that has sub-surfaces associated, is called the
+ parent surface. Sub-surfaces can be arbitrarily nested and create
+ a tree of sub-surfaces.
+
+ The root surface in a tree of sub-surfaces is the main
+ surface. The main surface cannot be a sub-surface, because
+ sub-surfaces must always have a parent.
+
+ A main surface with its sub-surfaces forms a (compound) window.
+ For window management purposes, this set of wl_surface objects is
+ to be considered as a single window, and it should also behave as
+ such.
+
+ The aim of sub-surfaces is to offload some of the compositing work
+ within a window from clients to the compositor. A prime example is
+ a video player with decorations and video in separate wl_surface
+ objects. This should allow the compositor to pass YUV video buffer
+ processing to dedicated overlay hardware when possible.
+ </description>
+
+ <request name="destroy" type="destructor">
+ <description summary="unbind from the subcompositor interface">
+ Informs the server that the client will not be using this
+ protocol object anymore. This does not affect any other
+ objects, wl_subsurface objects included.
+ </description>
+ </request>
+
+ <enum name="error">
+ <entry name="bad_surface" value="0"
+ summary="the to-be sub-surface is invalid"/>
+ </enum>
+
+ <request name="get_subsurface">
+ <description summary="give a surface the role sub-surface">
+ Create a sub-surface interface for the given surface, and
+ associate it with the given parent surface. This turns a
+ plain wl_surface into a sub-surface.
+
+ The to-be sub-surface must not already have a dedicated
+ purpose, like any shell surface type, cursor image, drag icon,
+ or sub-surface. Otherwise a protocol error is raised.
+ </description>
+
+ <arg name="id" type="new_id" interface="wl_subsurface"
+ summary="the new subsurface object id"/>
+ <arg name="surface" type="object" interface="wl_surface"
+ summary="the surface to be turned into a sub-surface"/>
+ <arg name="parent" type="object" interface="wl_surface"
+ summary="the parent surface"/>
+ </request>
+ </interface>
+
+ <interface name="wl_subsurface" version="1">
+ <description summary="sub-surface interface to a wl_surface">
+ An additional interface to a wl_surface object, which has been
+ made a sub-surface. A sub-surface has one parent surface. A
+ sub-surface's size and position are not limited to that of the parent.
+ Particularly, a sub-surface is not automatically clipped to its
+ parent's area.
+
+ A sub-surface becomes mapped, when a non-NULL wl_buffer is applied
+ and the parent surface is mapped. The order of which one happens
+ first is irrelevant. A sub-surface is hidden if the parent becomes
+ hidden, or if a NULL wl_buffer is applied. These rules apply
+ recursively through the tree of surfaces.
+
+ The behaviour of wl_surface.commit request on a sub-surface
+ depends on the sub-surface's mode. The possible modes are
+ synchronized and desynchronized, see methods
+ wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized
+ mode caches the wl_surface state to be applied when the parent's
+ state gets applied, and desynchronized mode applies the pending
+ wl_surface state directly. A sub-surface is initially in the
+ synchronized mode.
+
+ Sub-surfaces have also other kind of state, which is managed by
+ wl_subsurface requests, as opposed to wl_surface requests. This
+ state includes the sub-surface position relative to the parent
+ surface (wl_subsurface.set_position), and the stacking order of
+ the parent and its sub-surfaces (wl_subsurface.place_above and
+ .place_below). This state is applied when the parent surface's
+ wl_surface state is applied, regardless of the sub-surface's mode.
+ As the exception, set_sync and set_desync are effective immediately.
+
+ The main surface can be thought to be always in desynchronized mode,
+ since it does not have a parent in the sub-surfaces sense.
+
+ Even if a sub-surface is in desynchronized mode, it will behave as
+ in synchronized mode, if its parent surface behaves as in
+ synchronized mode. This rule is applied recursively throughout the
+ tree of surfaces. This means, that one can set a sub-surface into
+ synchronized mode, and then assume that all its child and grand-child
+ sub-surfaces are synchronized, too, without explicitly setting them.
+
+ If the wl_surface associated with the wl_subsurface is destroyed, the
+ wl_subsurface object becomes inert. Note, that destroying either object
+ takes effect immediately. If you need to synchronize the removal
+ of a sub-surface to the parent surface update, unmap the sub-surface
+ first by attaching a NULL wl_buffer, update parent, and then destroy
+ the sub-surface.
+
+ If the parent wl_surface object is destroyed, the sub-surface is
+ unmapped.
+ </description>
+
+ <request name="destroy" type="destructor">
+ <description summary="remove sub-surface interface">
+ The sub-surface interface is removed from the wl_surface object
+ that was turned into a sub-surface with
+ wl_subcompositor.get_subsurface request. The wl_surface's association
+ to the parent is deleted, and the wl_surface loses its role as
+ a sub-surface. The wl_surface is unmapped.
+ </description>
+ </request>
+
+ <enum name="error">
+ <entry name="bad_surface" value="0"
+ summary="wl_surface is not a sibling or the parent"/>
+ </enum>
+
+ <request name="set_position">
+ <description summary="reposition the sub-surface">
+ This schedules a sub-surface position change.
+ The sub-surface will be moved so, that its origin (top-left
+ corner pixel) will be at the location x, y of the parent surface
+ coordinate system. The coordinates are not restricted to the parent
+ surface area. Negative values are allowed.
+
+ The next wl_surface.commit on the parent surface will reset
+ the sub-surface's position to the scheduled coordinates.
+
+ If more than one set_position request is invoked by the client before
+ the commit of the parent surface, the position of a new request always
+ replaces the scheduled position from any previous request.
+
+ The initial position is 0, 0.
+ </description>
+
+ <arg name="x" type="int" summary="coordinate in the parent surface"/>
+ <arg name="y" type="int" summary="coordinate in the parent surface"/>
+ </request>
+
+ <request name="place_above">
+ <description summary="restack the sub-surface">
+ This sub-surface is taken from the stack, and put back just
+ above the reference surface, changing the z-order of the sub-surfaces.
+ The reference surface must be one of the sibling surfaces, or the
+ parent surface. Using any other surface, including this sub-surface,
+ will cause a protocol error.
+
+ The z-order is double-buffered. Requests are handled in order and
+ applied immediately to a pending state, then committed to the active
+ state on the next commit of the parent surface.
+ See wl_surface.commit and wl_subcompositor.get_subsurface.
+
+ A new sub-surface is initially added as the top-most in the stack
+ of its siblings and parent.
+ </description>
+
+ <arg name="sibling" type="object" interface="wl_surface"
+ summary="the reference surface"/>
+ </request>
+
+ <request name="place_below">
+ <description summary="restack the sub-surface">
+ The sub-surface is placed just below of the reference surface.
+ See wl_subsurface.place_above.
+ </description>
+
+ <arg name="sibling" type="object" interface="wl_surface"
+ summary="the reference surface"/>
+ </request>
+
+ <request name="set_sync">
+ <description summary="set sub-surface to synchronized mode">
+ Change the commit behaviour of the sub-surface to synchronized
+ mode, also described as the parent dependant mode.
+
+ In synchronized mode, wl_surface.commit on a sub-surface will
+ accumulate the committed state in a cache, but the state will
+ not be applied and hence will not change the compositor output.
+ The cached state is applied to the sub-surface immediately after
+ the parent surface's state is applied. This ensures atomic
+ updates of the parent and all its synchronized sub-surfaces.
+ Applying the cached state will invalidate the cache, so further
+ parent surface commits do not (re-)apply old state.
+
+ See wl_subsurface for the recursive effect of this mode.
+ </description>
+ </request>
+
+ <request name="set_desync">
+ <description summary="set sub-surface to desynchronized mode">
+ Change the commit behaviour of the sub-surface to desynchronized
+ mode, also described as independent or freely running mode.
+
+ In desynchronized mode, wl_surface.commit on a sub-surface will
+ apply the pending state directly, without caching, as happens
+ normally with a wl_surface. Calling wl_surface.commit on the
+ parent surface has no effect on the sub-surface's wl_surface
+ state. This mode allows a sub-surface to be updated on its own.
+
+ If cached state exists when wl_surface.commit is called in
+ desynchronized mode, the pending state is added to the cached
+ state, and applied as whole. This invalidates the cache.
+
+ Note: even if a sub-surface is set to desynchronized, a parent
+ sub-surface may override it to behave as synchronized. For details,
+ see wl_subsurface.
+
+ If a surface's parent surface behaves as desynchronized, then
+ the cached state is applied on set_desync.
+ </description>
+ </request>
+
+ </interface>
+
</protocol>
diff --git a/src/3rdparty/protocol/xdg-shell.xml b/src/3rdparty/protocol/xdg-shell.xml
index 79a283173..275837f3d 100644
--- a/src/3rdparty/protocol/xdg-shell.xml
+++ b/src/3rdparty/protocol/xdg-shell.xml
@@ -45,7 +45,7 @@
they implement using static_assert to ensure the protocol and
implementation versions match.
</description>
- <entry name="current" value="3" summary="Always the latest version"/>
+ <entry name="current" value="4" summary="Always the latest version"/>
</enum>
@@ -137,11 +137,8 @@
</description>
</request>
- <request name="set_transient_for">
+ <request name="set_parent">
<description summary="surface is a child of another surface">
- Setting a surface as transient of another means that it is child
- of another surface.
-
Child surfaces are stacked above their parents, and will be
unmapped if the parent is unmapped too. They should not appear
on task bars and alt+tab.
@@ -149,32 +146,6 @@
<arg name="parent" type="object" interface="wl_surface" allow-null="true"/>
</request>
- <request name="set_margin">
- <description summary="set the visible frame boundaries">
- This tells the compositor what the visible size of the window
- should be, so it can use it to determine what borders to use for
- constrainment and alignment.
-
- CSD often has invisible areas for decoration purposes, like drop
- shadows. These "shadow" drawings need to be subtracted out of the
- normal boundaries of the window when computing where to place
- windows (e.g. to set this window so it's centered on top of another,
- or to put it to the left or right of the screen.)
-
- This value should change as little as possible at runtime, to
- prevent flicker.
-
- This value is also ignored when the window is maximized or
- fullscreen, and assumed to be 0.
-
- If never called, this value is assumed to be 0.
- </description>
- <arg name="left_margin" type="int"/>
- <arg name="right_margin" type="int"/>
- <arg name="top_margin" type="int"/>
- <arg name="bottom_margin" type="int"/>
- </request>
-
<request name="set_title">
<description summary="set surface title">
Set a short title for the surface.
@@ -201,6 +172,26 @@
<arg name="app_id" type="string"/>
</request>
+ <request name="show_window_menu">
+ <description summary="show the window menu">
+ Clients implementing client-side decorations might want to show
+ a context menu when right-clicking on the decorations, giving the
+ user a menu that they can use to maximize or minimize the window.
+
+ This request asks the compositor to pop up such a window menu at
+ the given position, relative to the parent surface. There are
+ no guarantees as to what the window menu contains.
+
+ Your surface must have focus on the seat passed in to pop up the
+ window menu.
+ </description>
+
+ <arg name="seat" type="object" interface="wl_seat" summary="the seat to pop the window up on"/>
+ <arg name="serial" type="uint" summary="serial of the event to pop up the window for"/>
+ <arg name="x" type="int" summary="the x position to pop up the window menu at"/>
+ <arg name="y" type="int" summary="the y position to pop up the window menu at"/>
+ </request>
+
<request name="move">
<description summary="start an interactive move">
Start a pointer-driven move of the surface.
@@ -244,46 +235,12 @@
<arg name="edges" type="uint" summary="which edge or corner is being dragged"/>
</request>
- <event name="configure">
- <description summary="suggest resize">
- The configure event asks the client to resize its surface.
-
- The size is a hint, in the sense that the client is free to
- ignore it if it doesn't resize, pick a smaller size (to
- satisfy aspect ratio or resize in steps of NxM pixels).
-
- The client is free to dismiss all but the last configure
- event it received.
-
- The width and height arguments specify the size of the window
- in surface local coordinates.
- </description>
-
- <arg name="width" type="int"/>
- <arg name="height" type="int"/>
- </event>
-
- <request name="set_output">
- <description summary="set the default output used by this surface">
- Set the default output used by this surface when it is first mapped.
-
- If this value is NULL (default), it's up to the compositor to choose
- which display will be used to map this surface.
-
- When fullscreen or maximized state are set on this surface, and it
- wasn't mapped yet, the output set with this method will be used.
- Otherwise, the output where the surface is currently mapped will be
- used.
- </description>
- <arg name="output" type="object" interface="wl_output" allow-null="true"/>
- </request>
-
<enum name="state">
<description summary="types of state on the surface">
The different state values used on the surface. This is designed for
state values like maximized, fullscreen. It is paired with the
- request_change_state event to ensure that both the client and the
- compositor setting the state can be synchronized.
+ configure event to ensure that both the client and the compositor
+ setting the state can be synchronized.
States set in this way are double-buffered. They will get applied on
the next commit.
@@ -300,89 +257,101 @@
0x1000 - 0x1FFF: GNOME
</description>
<entry name="maximized" value="1" summary="the surface is maximized">
- A non-zero value indicates the surface is maximized. Otherwise,
- the surface is unmaximized.
+ The surface is maximized. The window geometry specified in the configure
+ event must be obeyed by the client.
</entry>
<entry name="fullscreen" value="2" summary="the surface is fullscreen">
- A non-zero value indicates the surface is fullscreen. Otherwise,
- the surface is not fullscreen.
+ The surface is fullscreen. The window geometry specified in the configure
+ event must be obeyed by the client.
+ </entry>
+ <entry name="resizing" value="3">
+ The surface is being resized. The window geometry specified in the
+ configure event is a maximum; the client cannot resize beyond it.
+ Clients that have aspect ratio or cell sizing configuration can use
+ a smaller size, however.
+ </entry>
+ <entry name="activated" value="4">
+ Client window decorations should be painted as if the window is
+ active. Do not assume this means that the window actually has
+ keyboard or pointer focus.
</entry>
</enum>
- <request name="request_change_state">
- <description summary="client requests to change a surface's state">
- This asks the compositor to change the state. If the compositor wants
- to change the state, it will send a change_state event with the same
- state_type, value, and serial, and the event flow continues as if it
- it was initiated by the compositor.
+ <event name="configure">
+ <description summary="suggest a surface change">
+ The configure event asks the client to resize its surface.
- If the compositor does not want to change the state, it will send a
- change_state to the client with the old value of the state.
- </description>
- <arg name="state_type" type="uint" summary="the state to set"/>
- <arg name="value" type="uint" summary="the value to change the state to"/>
- <arg name="serial" type="uint" summary="an event serial">
- This serial is so the client can know which change_state event corresponds
- to which request_change_state request it sent out.
- </arg>
- </request>
+ The width and height arguments specify a hint to the window
+ about how its surface should be resized in window geometry
+ coordinates. The states listed in the event specify how the
+ width/height arguments should be interpreted.
+
+ A client should arrange a new surface, and then send a
+ ack_configure request with the serial sent in this configure
+ event before attaching a new surface.
- <event name="change_state">
- <description summary="compositor wants to change a surface's state">
- This event tells the client to change a surface's state. The client
- should respond with an ack_change_state request to the compositor to
- guarantee that the compositor knows that the client has seen it.
+ If the client receives multiple configure events before it
+ can respond to one, it is free to discard all but the last
+ event it received.
</description>
- <arg name="state_type" type="uint" summary="the state to set"/>
- <arg name="value" type="uint" summary="the value to change the state to"/>
- <arg name="serial" type="uint" summary="a serial for the compositor's own tracking"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ <arg name="states" type="array"/>
+ <arg name="serial" type="uint"/>
</event>
- <request name="ack_change_state">
- <description summary="ack a change_state event">
- When a change_state event is received, a client should then ack it
- using the ack_change_state request to ensure that the compositor
+ <request name="ack_configure">
+ <description summary="ack a configure event">
+ When a configure event is received, a client should then ack it
+ using the ack_configure request to ensure that the compositor
knows the client has seen the event.
By this point, the state is confirmed, and the next attach should
- contain the buffer drawn for the new state value.
-
- The values here need to be the same as the values in the cooresponding
- change_state event.
+ contain the buffer drawn for the configure event you are acking.
</description>
- <arg name="state_type" type="uint" summary="the state to set"/>
- <arg name="value" type="uint" summary="the value to change the state to"/>
- <arg name="serial" type="uint" summary="a serial to pass to change_state"/>
+ <arg name="serial" type="uint" summary="a serial to configure for"/>
</request>
- <request name="set_minimized">
- <description summary="minimize the surface">
- Minimize the surface.
+ <request name="set_window_geometry">
+ <description summary="set the new window geometry">
+ The window geometry of a window is its "visible bounds" from the
+ user's perspective. Client-side decorations often have invisible
+ portions like drop-shadows which should be ignored for the
+ purposes of aligning, placing and constraining windows.
+
+ The default value is the full bounds of the surface, including any
+ subsurfaces. Once the window geometry of the surface is set once,
+ it is not possible to unset it, and it will remain the same until
+ set_window_geometry is called again, even if a new subsurface or
+ buffer is attached.
+
+ If responding to a configure event, the window geometry in here
+ must respect the sizing negotiations specified by the states in
+ the configure event.
</description>
+ <arg name="x" type="int"/>
+ <arg name="y" type="int"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
</request>
- <event name="activated">
- <description summary="surface was activated">
- The activated_set event is sent when this surface has been
- activated, which means that the surface has user attention.
- Window decorations should be updated accordingly. You should
- not use this event for anything but the style of decorations
- you display, use wl_keyboard.enter and wl_keyboard.leave for
- determining keyboard focus.
- </description>
- </event>
+ <request name="set_maximized" />
+ <request name="unset_maximized" />
+
+ <request name="set_fullscreen">
+ <description summary="set the window as fullscreen on a monitor">
+ Make the surface fullscreen.
- <event name="deactivated">
- <description summary="surface was deactivated">
- The deactivate event is sent when this surface has been
- deactivated, which means that the surface lost user attention.
- Window decorations should be updated accordingly. You should
- not use this event for anything but the style of decorations
- you display, use wl_keyboard.enter and wl_keyboard.leave for
- determining keyboard focus.
+ You can specify an output that you would prefer to be fullscreen.
+ If this value is NULL, it's up to the compositor to choose which
+ display will be used to map this surface.
</description>
- </event>
+ <arg name="output" type="object" interface="wl_output" allow-null="true"/>
+ </request>
+ <request name="unset_fullscreen" />
+
+ <request name="set_minimized" />
<event name="close">
<description summary="surface wants to be closed">
diff --git a/src/client/client.pro b/src/client/client.pro
index a8a1136ea..00e9cd04a 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -3,10 +3,16 @@ QT += core-private gui-private
QT_FOR_PRIVATE += platformsupport-private
MODULE=waylandclient
-MODULE_PLUGIN_TYPES = wayland-graphics-integration-client wayland-decoration-client
+MODULE_PLUGIN_TYPES = \
+ wayland-graphics-integration-client \
+ wayland-inputdevice-integration \
+ wayland-decoration-client
load(qt_module)
+# We have a bunch of C code with casts, so we can't have this option
+QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual
+
CONFIG -= precompile_header
CONFIG -= create_cmake
CONFIG += link_pkgconfig qpa/genericunixfontdatabase wayland-scanner
@@ -112,3 +118,4 @@ HEADERS += qwaylandintegration_p.h \
include(hardwareintegration/hardwareintegration.pri)
include(shellintegration/shellintegration.pri)
+include(inputdeviceintegration/inputdeviceintegration.pri)
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
index 2c4d8ff1b..e6ac1b1f3 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandClientBufferIntegration::QWaylandClientBufferIntegration()
{
@@ -53,4 +47,6 @@ QWaylandClientBufferIntegration::~QWaylandClientBufferIntegration()
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h
index bbe42eb26..9a38b6d2f 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,13 +39,15 @@
QT_BEGIN_NAMESPACE
-class QWaylandWindow;
-class QWaylandDisplay;
class QWindow;
-
class QPlatformOpenGLContext;
class QSurfaceFormat;
+namespace QtWaylandClient {
+
+class QWaylandWindow;
+class QWaylandDisplay;
+
class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegration
{
public:
@@ -69,8 +63,18 @@ public:
virtual QWaylandWindow *createEglWindow(QWindow *window) = 0;
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
+
+ enum NativeResource {
+ EglDisplay,
+ EglConfig,
+ EglContext
+ };
+ virtual void *nativeResource(NativeResource /*resource*/) { return Q_NULLPTR; }
+ virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return Q_NULLPTR; }
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIENTBUFFERINTEGRATION_H
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
index 7f2648bcf..a8d2902be 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive))
@@ -93,4 +87,6 @@ QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create(
return 0;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h
index 4a1c41286..24063c2b9 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandClientBufferIntegration;
class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationFactory
@@ -56,6 +50,8 @@ public:
static QWaylandClientBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
index afc105106..2f6357a31 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandClientBufferIntegrationPlugin::QWaylandClientBufferIntegrationPlugin(QObject *parent) :
QObject(parent)
{
@@ -52,4 +46,6 @@ QWaylandClientBufferIntegrationPlugin::~QWaylandClientBufferIntegrationPlugin()
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
index 7f96ebc6a..f2c0bc08d 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandClientBufferIntegration;
#define QWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3"
@@ -64,6 +58,8 @@ public:
virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/client/hardwareintegration/qwaylandhardwareintegration.cpp b/src/client/hardwareintegration/qwaylandhardwareintegration.cpp
index 469f80360..a946027b6 100644
--- a/src/client/hardwareintegration/qwaylandhardwareintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandhardwareintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
#include "qwaylanddisplay_p.h"
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandHardwareIntegration::QWaylandHardwareIntegration(struct ::wl_registry *registry, int id)
: qt_hardware_integration(registry, id, 1)
{
@@ -69,4 +63,6 @@ void QWaylandHardwareIntegration::hardware_integration_server_backend(const QStr
m_server_buffer = name;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
index 84aa18ace..c672b2b27 100644
--- a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class Q_WAYLAND_CLIENT_EXPORT QWaylandHardwareIntegration : public QtWayland::qt_hardware_integration
@@ -66,6 +60,8 @@ private:
QString m_server_buffer;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
index 5bac68929..347de3d21 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandServerBuffer::QWaylandServerBuffer()
: m_user_data(0)
{
@@ -79,4 +73,6 @@ QWaylandServerBufferIntegration::~QWaylandServerBufferIntegration()
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
index 18090a798..286860c36 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBuffer
@@ -90,6 +84,8 @@ public:
virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) = 0;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
index 2b61dbdc8..1f5a97d8a 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration-client"), Qt::CaseInsensitive))
@@ -93,4 +87,6 @@ QWaylandServerBufferIntegration *QWaylandServerBufferIntegrationFactory::create(
return 0;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h
index 48e5e13d9..6daa2e074 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandServerBufferIntegration;
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegrationFactory
@@ -56,6 +50,8 @@ public:
static QWaylandServerBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp
index 8fc31a883..641e63ac1 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandServerBufferIntegrationPlugin::QWaylandServerBufferIntegrationPlugin(QObject *parent)
: QObject(parent)
{
@@ -51,4 +45,6 @@ QWaylandServerBufferIntegrationPlugin::~QWaylandServerBufferIntegrationPlugin()
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
index d5d1d78f5..51d64512a 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandServerBufferIntegration;
#define QWaylandServerBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3"
@@ -64,6 +58,8 @@ public:
virtual QWaylandServerBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/client/inputdeviceintegration/inputdeviceintegration.pri b/src/client/inputdeviceintegration/inputdeviceintegration.pri
new file mode 100644
index 000000000..f16dfc3c9
--- /dev/null
+++ b/src/client/inputdeviceintegration/inputdeviceintegration.pri
@@ -0,0 +1,11 @@
+INCLUDEPATH += $$PWD
+
+SOURCES += \
+ $$PWD/qwaylandinputdeviceintegrationplugin.cpp \
+ $$PWD/qwaylandinputdeviceintegrationfactory.cpp
+
+HEADERS += \
+ $$PWD/qwaylandinputdeviceintegration_p.h \
+ $$PWD/qwaylandinputdeviceintegrationplugin_p.h \
+ $$PWD/qwaylandinputdeviceintegrationfactory_p.h
+
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h
new file mode 100644
index 000000000..3feb88684
--- /dev/null
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDINPUTDEVICEINTEGRATION_H
+#define QWAYLANDINPUTDEVICEINTEGRATION_H
+
+#include <QtCore/qglobal.h>
+#include <QtWaylandClient/private/qwaylandclientexport_p.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+class QWaylandDisplay;
+class QWaylandInputDevice;
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegration
+{
+public:
+ QWaylandInputDeviceIntegration() {}
+ virtual ~QWaylandInputDeviceIntegration() {}
+
+ virtual QWaylandInputDevice *createInputDevice(QWaylandDisplay *d, int version, uint32_t id) = 0;
+};
+
+}
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDINPUTDEVICEINTEGRATION_H
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
new file mode 100644
index 000000000..143facfca
--- /dev/null
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwaylandinputdeviceintegrationfactory_p.h"
+#include "qwaylandinputdeviceintegrationplugin_p.h"
+#include "qwaylandinputdeviceintegration_p.h"
+#include <QtCore/private/qfactoryloader_p.h>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+#ifndef QT_NO_LIBRARY
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QWaylandInputDeviceIntegrationFactoryInterface_iid, QLatin1String("/wayland-inputdevice-integration"), Qt::CaseInsensitive))
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
+ (QWaylandInputDeviceIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
+#endif
+
+QStringList QWaylandInputDeviceIntegrationFactory::keys(const QString &pluginPath)
+{
+#ifndef QT_NO_LIBRARY
+ QStringList list;
+ if (!pluginPath.isEmpty()) {
+ QCoreApplication::addLibraryPath(pluginPath);
+ list = directLoader()->keyMap().values();
+ if (!list.isEmpty()) {
+ const QString postFix = QStringLiteral(" (from ")
+ + QDir::toNativeSeparators(pluginPath)
+ + QLatin1Char(')');
+ const QStringList::iterator end = list.end();
+ for (QStringList::iterator it = list.begin(); it != end; ++it)
+ (*it).append(postFix);
+ }
+ }
+ list.append(loader()->keyMap().values());
+ return list;
+#else
+ return QStringList();
+#endif
+}
+
+QWaylandInputDeviceIntegration *QWaylandInputDeviceIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
+{
+#ifndef QT_NO_LIBRARY
+ // Try loading the plugin from platformPluginPath first:
+ if (!pluginPath.isEmpty()) {
+ QCoreApplication::addLibraryPath(pluginPath);
+ if (QWaylandInputDeviceIntegration *ret = qLoadPlugin1<QWaylandInputDeviceIntegration, QWaylandInputDeviceIntegrationPlugin>(directLoader(), name, args))
+ return ret;
+ }
+ if (QWaylandInputDeviceIntegration *ret = qLoadPlugin1<QWaylandInputDeviceIntegration, QWaylandInputDeviceIntegrationPlugin>(loader(), name, args))
+ return ret;
+#endif
+ return Q_NULLPTR;
+}
+
+}
+
+QT_END_NAMESPACE
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h
new file mode 100644
index 000000000..1eddca862
--- /dev/null
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
+#define QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
+
+#include <QtWaylandClient/private/qwaylandclientexport_p.h>
+#include <QtCore/QStringList>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+class QWaylandInputDeviceIntegration;
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegrationFactory
+{
+public:
+ static QStringList keys(const QString &pluginPath = QString());
+ static QWaylandInputDeviceIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
+};
+
+}
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDINPUTDEVICENTEGRATIONFACTORY_H
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp
new file mode 100644
index 000000000..9fc9b8045
--- /dev/null
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwaylandinputdeviceintegrationplugin_p.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+QWaylandInputDeviceIntegrationPlugin::QWaylandInputDeviceIntegrationPlugin(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QWaylandInputDeviceIntegrationPlugin::~QWaylandInputDeviceIntegrationPlugin()
+{
+}
+
+}
+
+QT_END_NAMESPACE
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h
new file mode 100644
index 000000000..ab646417d
--- /dev/null
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
+#define QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
+
+#include <QtWaylandClient/private/qwaylandclientexport_p.h>
+
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+#include <QtCore/QObject>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
+class QWaylandInputDeviceIntegration;
+
+#define QWaylandInputDeviceIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandInputDeviceIntegrationFactoryInterface.5.3"
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegrationPlugin : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QWaylandInputDeviceIntegrationPlugin(QObject *parent = 0);
+ ~QWaylandInputDeviceIntegrationPlugin();
+
+ virtual QWaylandInputDeviceIntegration *create(const QString &key, const QStringList &paramList) = 0;
+};
+
+}
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
index e4b81bb83..7698ff750 100644
--- a/src/client/qwaylandabstractdecoration.cpp
+++ b/src/client/qwaylandabstractdecoration.cpp
@@ -1,41 +1,33 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandAbstractDecorationPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QWaylandAbstractDecoration)
@@ -184,4 +178,6 @@ QWaylandWindow *QWaylandAbstractDecoration::waylandWindow() const
return d->m_wayland_window;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandabstractdecoration_p.h b/src/client/qwaylandabstractdecoration_p.h
index 6171cab14..e489c09a0 100644
--- a/src/client/qwaylandabstractdecoration_p.h
+++ b/src/client/qwaylandabstractdecoration_p.h
@@ -1,41 +1,33 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -62,6 +54,9 @@ class QWindow;
class QPaintDevice;
class QPainter;
class QEvent;
+
+namespace QtWaylandClient {
+
class QWaylandScreen;
class QWaylandWindow;
class QWaylandInputDevice;
@@ -100,6 +95,8 @@ protected:
bool isLeftReleased(Qt::MouseButtons newMouseButtonState);
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDABSTRACTDECORATION_H
diff --git a/src/client/qwaylandbuffer_p.h b/src/client/qwaylandbuffer_p.h
index 6d2bb66b3..e1a891d12 100644
--- a/src/client/qwaylandbuffer_p.h
+++ b/src/client/qwaylandbuffer_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class Q_WAYLAND_CLIENT_EXPORT QWaylandBuffer {
public:
QWaylandBuffer()
@@ -61,11 +55,14 @@ public:
virtual ~QWaylandBuffer() { }
wl_buffer *buffer() {return mBuffer;}
virtual QSize size() const = 0;
+ virtual int scale() const { return 1; }
protected:
struct wl_buffer *mBuffer;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDBUFFER_H
diff --git a/src/client/qwaylandclientexport_p.h b/src/client/qwaylandclientexport_p.h
index d9d6d7f7c..993c900be 100644
--- a/src/client/qwaylandclientexport_p.h
+++ b/src/client/qwaylandclientexport_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp
index 355a7163a..a2b7a6697 100644
--- a/src/client/qwaylandclipboard.cpp
+++ b/src/client/qwaylandclipboard.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandClipboard::QWaylandClipboard(QWaylandDisplay *display)
: mDisplay(display)
{
@@ -112,4 +106,6 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const
return inputDevice->dataDevice()->selectionSource() != 0;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandclipboard_p.h b/src/client/qwaylandclipboard_p.h
index 0dea3371a..26cbbaeec 100644
--- a/src/client/qwaylandclipboard_p.h
+++ b/src/client/qwaylandclipboard_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class Q_WAYLAND_CLIENT_EXPORT QWaylandClipboard : public QPlatformClipboard
@@ -67,6 +61,8 @@ private:
QWaylandDisplay *mDisplay;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIPBOARD_H
diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp
index 2a1339a79..8e8293a09 100644
--- a/src/client/qwaylandcursor.cpp
+++ b/src/client/qwaylandcursor.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,6 +45,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandCursor::QWaylandCursor(QWaylandScreen *screen)
: mDisplay(screen->display())
{
@@ -305,4 +299,6 @@ void QWaylandCursor::initCursorMap()
mCursorNamesMap.insert(ResizeSouthWestCursor, "bottom_left_corner");
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h
index 282ac685f..02023dd55 100644
--- a/src/client/qwaylandcursor_p.h
+++ b/src/client/qwaylandcursor_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@ struct wl_cursor_theme;
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandScreen;
@@ -111,6 +105,8 @@ private:
QMultiMap<WaylandCursor, QByteArray> mCursorNamesMap;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCURSOR_H
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index edf73a56a..03a8c4b83 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -57,6 +57,10 @@
#include <QDebug>
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWaylandInputDevice *inputDevice)
: QtWayland::wl_data_device(manager->get_data_device(inputDevice->wl_seat()))
, m_display(manager->display())
@@ -249,3 +253,7 @@ void QWaylandDataDevice::dragSourceTargetChanged(const QString &mimeType)
{
static_cast<QWaylandDrag *>(QGuiApplicationPrivate::platformIntegration()->drag())->updateTarget(mimeType);
}
+
+}
+
+QT_END_NAMESPACE
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index ef82d84dd..d6d38d681 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -48,12 +48,15 @@
QT_BEGIN_NAMESPACE
-class QWaylandDisplay;
class QMimeData;
+class QWindow;
+
+namespace QtWaylandClient {
+
+class QWaylandDisplay;
class QWaylandDataDeviceManager;
class QWaylandDataOffer;
class QWaylandDataSource;
-class QWindow;
class QWaylandInputDevice;
class QWaylandWindow;
@@ -99,6 +102,8 @@ private:
QScopedPointer<QWaylandDataSource> m_dragSource;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDATADEVICE_H
diff --git a/src/client/qwaylanddatadevicemanager.cpp b/src/client/qwaylanddatadevicemanager.cpp
index ea578ff7b..b5a98b090 100644
--- a/src/client/qwaylanddatadevicemanager.cpp
+++ b/src/client/qwaylanddatadevicemanager.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandDataDeviceManager::QWaylandDataDeviceManager(QWaylandDisplay *display, uint32_t id)
: wl_data_device_manager(display->wl_registry(), id, 1)
, m_display(display)
@@ -77,5 +71,6 @@ QWaylandDisplay *QWaylandDataDeviceManager::display() const
return m_display;
}
+}
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddatadevicemanager_p.h b/src/client/qwaylanddatadevicemanager_p.h
index 3ed21d26a..151197e3b 100644
--- a/src/client/qwaylanddatadevicemanager_p.h
+++ b/src/client/qwaylanddatadevicemanager_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandDataDevice;
class QWaylandDataSource;
@@ -66,6 +60,8 @@ private:
QWaylandDisplay *m_display;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDATADEVICEMANAGER_H
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp
index ab3642bf4..dd28f7870 100644
--- a/src/client/qwaylanddataoffer.cpp
+++ b/src/client/qwaylanddataoffer.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,6 +43,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
static QString utf8Text()
{
return QStringLiteral("text/plain;charset=utf-8");
@@ -178,4 +172,6 @@ int QWaylandMimeData::readData(int fd, QByteArray &data) const
return n;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h
index 12fc0a22f..391ceb173 100644
--- a/src/client/qwaylanddataoffer_p.h
+++ b/src/client/qwaylanddataoffer_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandMimeData;
@@ -91,6 +85,8 @@ private:
mutable QHash<QString, QByteArray> m_data;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp
index 3376db567..ad43b0698 100644
--- a/src/client/qwaylanddatasource.cpp
+++ b/src/client/qwaylanddatasource.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,6 +45,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandDataSource::QWaylandDataSource(QWaylandDataDeviceManager *dataDeviceManager, QMimeData *mimeData)
: QtWayland::wl_data_source(dataDeviceManager->create_data_source())
, m_mime_data(mimeData)
@@ -93,4 +87,6 @@ void QWaylandDataSource::data_source_target(const QString &mime_type)
Q_EMIT targetChanged(mime_type);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h
index a721336f7..93f1f4681 100644
--- a/src/client/qwaylanddatasource_p.h
+++ b/src/client/qwaylanddatasource_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,9 @@
QT_BEGIN_NAMESPACE
class QMimeData;
+
+namespace QtWaylandClient {
+
class QWaylandDataDeviceManager;
class QWaylandDisplay;
@@ -76,6 +71,8 @@ private:
QMimeData *m_mime_data;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDATASOURCE_H
diff --git a/src/client/qwaylanddecorationfactory.cpp b/src/client/qwaylanddecorationfactory.cpp
index 6f1f74693..7e77b2318 100644
--- a/src/client/qwaylanddecorationfactory.cpp
+++ b/src/client/qwaylanddecorationfactory.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandDecorationFactoryInterface_iid, QLatin1String("/wayland-decoration-client"), Qt::CaseInsensitive))
@@ -94,4 +88,6 @@ QWaylandAbstractDecoration *QWaylandDecorationFactory::create(const QString &nam
return 0;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddecorationfactory_p.h b/src/client/qwaylanddecorationfactory_p.h
index a7729bcaf..de830aaf0 100644
--- a/src/client/qwaylanddecorationfactory_p.h
+++ b/src/client/qwaylanddecorationfactory_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandAbstractDecoration;
class Q_WAYLAND_CLIENT_EXPORT QWaylandDecorationFactory
@@ -56,6 +50,8 @@ public:
static QWaylandAbstractDecoration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDECORATIONFACTORY_H
diff --git a/src/client/qwaylanddecorationplugin.cpp b/src/client/qwaylanddecorationplugin.cpp
index edad5f5f0..bf7eca816 100644
--- a/src/client/qwaylanddecorationplugin.cpp
+++ b/src/client/qwaylanddecorationplugin.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandDecorationPlugin::QWaylandDecorationPlugin(QObject *parent)
: QObject(parent)
{
@@ -51,4 +45,6 @@ QWaylandDecorationPlugin::~QWaylandDecorationPlugin()
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddecorationplugin_p.h b/src/client/qwaylanddecorationplugin_p.h
index 6ed8935db..9f19b2948 100644
--- a/src/client/qwaylanddecorationplugin_p.h
+++ b/src/client/qwaylanddecorationplugin_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandAbstractDecoration;
#define QWaylandDecorationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandDecorationFactoryInterface.5.4"
@@ -64,6 +58,8 @@ public:
virtual QWaylandAbstractDecoration *create(const QString &key, const QStringList &paramList) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDECORATIONPLUGIN_H
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 11904ae07..e0155fc95 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -76,6 +68,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
struct wl_surface *QWaylandDisplay::createSurface(void *handle)
{
struct wl_surface *surface = mCompositor.create_surface();
@@ -97,6 +91,16 @@ QWaylandShellSurface *QWaylandDisplay::createShellSurface(QWaylandWindow *window
return Q_NULLPTR;
}
+struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
+{
+ struct ::wl_region *region = mCompositor.create_region();
+
+ Q_FOREACH (const QRect &rect, qregion.rects())
+ wl_region_add(region, rect.x(), rect.y(), rect.width(), rect.height());
+
+ return region;
+}
+
QWaylandClientBufferIntegration * QWaylandDisplay::clientBufferIntegration() const
{
return mWaylandIntegration->clientBufferIntegration();
@@ -161,7 +165,9 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
QWaylandDisplay::~QWaylandDisplay(void)
{
- qDeleteAll(mScreens);
+ foreach (QWaylandScreen *screen, mScreens) {
+ mWaylandIntegration->destroyScreen(screen);
+ }
mScreens.clear();
delete mDndSelectionHandler.take();
mEventThread->quit();
@@ -245,7 +251,7 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
} else if (interface == QStringLiteral("wl_shell")){
mShell.reset(new QtWayland::wl_shell(registry, id, 1));
} else if (interface == QStringLiteral("wl_seat")) {
- QWaylandInputDevice *inputDevice = new QWaylandInputDevice(this, version, id);
+ QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id);
mInputDevices.append(inputDevice);
} else if (interface == QStringLiteral("wl_data_device_manager")) {
mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
@@ -284,8 +290,8 @@ void QWaylandDisplay::registry_global_remove(uint32_t id)
if (global.interface == QStringLiteral("wl_output")) {
foreach (QWaylandScreen *screen, mScreens) {
if (screen->outputId() == id) {
- delete screen;
mScreens.removeOne(screen);
+ mWaylandIntegration->destroyScreen(screen);
break;
}
}
@@ -369,6 +375,11 @@ bool QWaylandDisplay::supportsWindowDecoration() const
return integrationSupport;
}
+QWaylandWindow *QWaylandDisplay::lastInputWindow() const
+{
+ return mLastInputWindow.data();
+}
+
void QWaylandDisplay::setLastInputDevice(QWaylandInputDevice *device, uint32_t serial, QWaylandWindow *win)
{
mLastInputDevice = device;
@@ -376,4 +387,6 @@ void QWaylandDisplay::setLastInputDevice(QWaylandInputDevice *device, uint32_t s
mLastInputWindow = win;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index 5a32413e4..7ba431d7c 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,7 @@
#include <QtCore/QObject>
#include <QtCore/QRect>
+#include <QtCore/QPointer>
#include <QtCore/QWaitCondition>
@@ -58,10 +51,22 @@ struct wl_cursor_image;
QT_BEGIN_NAMESPACE
class QAbstractEventDispatcher;
-class QWaylandInputDevice;
class QSocketNotifier;
-class QWaylandBuffer;
class QPlatformScreen;
+
+namespace QtWayland {
+ class qt_output_extension;
+ class qt_shell;
+ class qt_sub_surface_extension;
+ class qt_surface_extension;
+ class wl_text_input_manager;
+ class xdg_shell;
+}
+
+namespace QtWaylandClient {
+
+class QWaylandInputDevice;
+class QWaylandBuffer;
class QWaylandScreen;
class QWaylandClientBufferIntegration;
class QWaylandWindowManagerIntegration;
@@ -75,15 +80,6 @@ class QWaylandHardwareIntegration;
class QWaylandXdgShell;
class QWaylandShellSurface;
-namespace QtWayland {
- class qt_output_extension;
- class qt_shell;
- class qt_sub_surface_extension;
- class qt_surface_extension;
- class wl_text_input_manager;
- class xdg_shell;
-}
-
typedef void (*RegistryListener)(void *data,
struct wl_registry *registry,
uint32_t id,
@@ -103,6 +99,7 @@ public:
struct wl_surface *createSurface(void *handle);
QWaylandShellSurface *createShellSurface(QWaylandWindow *window);
+ struct ::wl_region *createRegion(const QRegion &qregion);
QWaylandClientBufferIntegration *clientBufferIntegration() const;
@@ -161,7 +158,7 @@ public:
uint32_t lastInputSerial() const { return mLastInputSerial; }
QWaylandInputDevice *lastInputDevice() const { return mLastInputDevice; }
- QWaylandWindow *lastInputWindow() const { return mLastInputWindow; }
+ QWaylandWindow *lastInputWindow() const;
void setLastInputDevice(QWaylandInputDevice *device, uint32_t serial, QWaylandWindow *window);
public slots:
@@ -206,7 +203,7 @@ private:
int mCompositorVersion;
uint32_t mLastInputSerial;
QWaylandInputDevice *mLastInputDevice;
- QWaylandWindow *mLastInputWindow;
+ QPointer<QWaylandWindow> mLastInputWindow;
void registry_global(uint32_t id, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
void registry_global_remove(uint32_t id) Q_DECL_OVERRIDE;
@@ -217,6 +214,8 @@ private:
int32_t width, int32_t height);
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDISPLAY_H
diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp
index e38e23da9..302864d4b 100644
--- a/src/client/qwaylanddnd.cpp
+++ b/src/client/qwaylanddnd.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,6 +45,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandDrag::QWaylandDrag(QWaylandDisplay *display)
: m_display(display)
{
@@ -141,4 +135,6 @@ void QWaylandDrag::finishDrag(const QPlatformDropQtResponse &response)
eventFilter(shapedPixmapWindow(), &event);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h
index 1d236fad5..994c65c45 100644
--- a/src/client/qwaylanddnd_p.h
+++ b/src/client/qwaylanddnd_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class Q_WAYLAND_CLIENT_EXPORT QWaylandDrag : public QBasicDrag
@@ -78,6 +72,8 @@ private:
QWaylandDisplay *m_display;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDDND_H
diff --git a/src/client/qwaylandeventthread.cpp b/src/client/qwaylandeventthread.cpp
index 22efd6a2a..e2e21c9e7 100644
--- a/src/client/qwaylandeventthread.cpp
+++ b/src/client/qwaylandeventthread.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandEventThread::QWaylandEventThread(QObject *parent)
: QObject(parent)
, m_display(0)
@@ -117,4 +111,6 @@ wl_display *QWaylandEventThread::display() const
return m_display;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandeventthread_p.h b/src/client/qwaylandeventthread_p.h
index 2df4b05c2..cd64b7046 100644
--- a/src/client/qwaylandeventthread_p.h
+++ b/src/client/qwaylandeventthread_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@ QT_BEGIN_NAMESPACE
class QSocketNotifier;
+namespace QtWaylandClient {
+
class Q_WAYLAND_CLIENT_EXPORT QWaylandEventThread : public QObject
{
Q_OBJECT
@@ -85,6 +79,8 @@ private:
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDEVENTTHREAD_H
diff --git a/src/client/qwaylandextendedoutput.cpp b/src/client/qwaylandextendedoutput.cpp
index bb6a4779e..d1e8ffe2f 100644
--- a/src/client/qwaylandextendedoutput.cpp
+++ b/src/client/qwaylandextendedoutput.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,10 +41,13 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandExtendedOutput::QWaylandExtendedOutput(QWaylandScreen *screen, ::qt_extended_output *extended_output)
: QtWayland::qt_extended_output(extended_output)
{
Q_UNUSED(screen);
}
+}
QT_END_NAMESPACE
diff --git a/src/client/qwaylandextendedoutput_p.h b/src/client/qwaylandextendedoutput_p.h
index 35ac194a4..b3e4c469e 100644
--- a/src/client/qwaylandextendedoutput_p.h
+++ b/src/client/qwaylandextendedoutput_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandScreen;
class QWaylandExtendedOutput;
@@ -57,6 +51,8 @@ public:
QWaylandExtendedOutput(QWaylandScreen *screen, struct ::qt_extended_output *extended_output);
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDEXTENDEDOUTPUT_H
diff --git a/src/client/qwaylandextendedsurface.cpp b/src/client/qwaylandextendedsurface.cpp
index e589698ef..d446b7845 100644
--- a/src/client/qwaylandextendedsurface.cpp
+++ b/src/client/qwaylandextendedsurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,6 +45,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window)
: QtWayland::qt_extended_surface(window->display()->windowExtension()->get_extended_surface(window->object()))
, m_window(window)
@@ -123,4 +117,6 @@ Qt::WindowFlags QWaylandExtendedSurface::setWindowFlags(Qt::WindowFlags flags)
return flags & (Qt::WindowStaysOnTopHint | Qt::WindowOverridesSystemGestures | Qt::BypassWindowManagerHint);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandextendedsurface_p.h b/src/client/qwaylandextendedsurface_p.h
index 1d966292c..efd7a0b2b 100644
--- a/src/client/qwaylandextendedsurface_p.h
+++ b/src/client/qwaylandextendedsurface_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandWindow;
@@ -76,6 +70,8 @@ private:
QVariantMap m_properties;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDEXTENDEDSURFACE_H
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
index e189b9451..119a15287 100644
--- a/src/client/qwaylandinputcontext.cpp
+++ b/src/client/qwaylandinputcontext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -52,6 +52,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
static Qt::Key toQtKey(uint32_t sym)
{
#ifndef QT_NO_WAYLAND_XKB
@@ -277,5 +279,7 @@ bool QWaylandInputContext::ensureTextInput()
return true;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h
index fbb26b9bf..522e95fff 100644
--- a/src/client/qwaylandinputcontext_p.h
+++ b/src/client/qwaylandinputcontext_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -47,6 +47,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandTextInput : public QtWayland::wl_text_input
@@ -99,6 +101,8 @@ private:
QScopedPointer<QWaylandTextInput> mTextInput;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDINPUTCONTEXT_H
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 14575146d..76ae25869 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -63,176 +55,121 @@
#include <QtGui/QGuiApplication>
-#ifndef QT_NO_WAYLAND_XKB
-#include <xkbcommon/xkbcommon.h>
-#include <xkbcommon/xkbcommon-keysyms.h>
-#endif
-
QT_BEGIN_NAMESPACE
-class QWaylandInputDevice::Keyboard : public QtWayland::wl_keyboard
-{
-public:
- Keyboard(QWaylandInputDevice *p)
- : mParent(p)
- , mFocus(0)
+namespace QtWaylandClient {
+
+QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p)
+ : mParent(p)
+ , mFocus(0)
#ifndef QT_NO_WAYLAND_XKB
- , mXkbContext(0)
- , mXkbMap(0)
- , mXkbState(0)
+ , mXkbContext(0)
+ , mXkbMap(0)
+ , mXkbState(0)
#endif
- , mFocusCallback(0)
- , mNativeModifiers(0)
- {
+ , mFocusCallback(0)
+ , mNativeModifiers(0)
+{
+ connect(&mRepeatTimer, SIGNAL(timeout()), this, SLOT(repeatKey()));
+}
+
#ifndef QT_NO_WAYLAND_XKB
- xkb_rule_names names;
- names.rules = strdup("evdev");
- names.model = strdup("pc105");
- names.layout = strdup("us");
- names.variant = strdup("");
- names.options = strdup("");
-
- mXkbContext = xkb_context_new(xkb_context_flags(0));
- if (mXkbContext) {
- mXkbMap = xkb_map_new_from_names(mXkbContext, &names, xkb_map_compile_flags(0));
- if (mXkbMap) {
- mXkbState = xkb_state_new(mXkbMap);
- }
- }
+bool QWaylandInputDevice::Keyboard::createDefaultKeyMap()
+{
+ if (mXkbContext && mXkbMap && mXkbState) {
+ return true;
+ }
- if (!mXkbContext || !mXkbMap || !mXkbState)
- qWarning() << "xkb_map_new_from_names failed, no key input";
-#endif
+ xkb_rule_names names;
+ names.rules = strdup("evdev");
+ names.model = strdup("pc105");
+ names.layout = strdup("us");
+ names.variant = strdup("");
+ names.options = strdup("");
+
+ mXkbContext = xkb_context_new(xkb_context_flags(0));
+ if (mXkbContext) {
+ mXkbMap = xkb_map_new_from_names(mXkbContext, &names, xkb_map_compile_flags(0));
+ if (mXkbMap) {
+ mXkbState = xkb_state_new(mXkbMap);
+ }
}
- ~Keyboard()
- {
-#ifndef QT_NO_WAYLAND_XKB
- if (mXkbState)
- xkb_state_unref(mXkbState);
- if (mXkbMap)
- xkb_map_unref(mXkbMap);
- if (mXkbContext)
- xkb_context_unref(mXkbContext);
-#endif
- wl_keyboard_destroy(object());
+
+ if (!mXkbContext || !mXkbMap || !mXkbState) {
+ qWarning() << "xkb_map_new_from_names failed, no key input";
+ return false;
}
+ return true;
+}
- void keyboard_keymap(uint32_t format,
- int32_t fd,
- uint32_t size) Q_DECL_OVERRIDE;
- void keyboard_enter(uint32_t time,
- struct wl_surface *surface,
- struct wl_array *keys) Q_DECL_OVERRIDE;
- void keyboard_leave(uint32_t time,
- struct wl_surface *surface) Q_DECL_OVERRIDE;
- void keyboard_key(uint32_t serial, uint32_t time,
- uint32_t key, uint32_t state) Q_DECL_OVERRIDE;
- void keyboard_modifiers(uint32_t serial,
- uint32_t mods_depressed,
- uint32_t mods_latched,
- uint32_t mods_locked,
- uint32_t group) Q_DECL_OVERRIDE;
-
- QWaylandInputDevice *mParent;
- QWaylandWindow *mFocus;
-#ifndef QT_NO_WAYLAND_XKB
- xkb_context *mXkbContext;
- xkb_keymap *mXkbMap;
- xkb_state *mXkbState;
+void QWaylandInputDevice::Keyboard::releaseKeyMap()
+{
+ if (mXkbState)
+ xkb_state_unref(mXkbState);
+ if (mXkbMap)
+ xkb_map_unref(mXkbMap);
+ if (mXkbContext)
+ xkb_context_unref(mXkbContext);
+}
#endif
- struct wl_callback *mFocusCallback;
- uint32_t mNativeModifiers;
- int mRepeatKey;
- uint32_t mRepeatCode;
- uint32_t mRepeatTime;
- QString mRepeatText;
+QWaylandInputDevice::Keyboard::~Keyboard()
+{
#ifndef QT_NO_WAYLAND_XKB
- xkb_keysym_t mRepeatSym;
+ releaseKeyMap();
#endif
+ if (mFocus)
+ QWindowSystemInterface::handleWindowActivated(0);
+ if (mFocusCallback)
+ wl_callback_destroy(mFocusCallback);
+ if (mParent->mVersion >= 3)
+ wl_keyboard_release(object());
+ else
+ wl_keyboard_destroy(object());
+}
- static const wl_callback_listener callback;
- static void focusCallback(void *data, struct wl_callback *callback, uint32_t time);
-};
+void QWaylandInputDevice::Keyboard::stopRepeat()
+{
+ mRepeatTimer.stop();
+}
-class QWaylandInputDevice::Pointer : public QtWayland::wl_pointer
+QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *p)
+ : mParent(p)
+ , mFocus(0)
+ , mEnterSerial(0)
+ , mCursorSerial(0)
+ , mButtons(0)
{
-public:
- Pointer(QWaylandInputDevice *p)
- : mParent(p)
- , mFocus(0)
- , mEnterSerial(0)
- , mCursorSerial(0)
- , mButtons(0)
- {
- }
- ~Pointer()
- {
+}
+
+QWaylandInputDevice::Pointer::~Pointer()
+{
+ if (mParent->mVersion >= 3)
+ wl_pointer_release(object());
+ else
wl_pointer_destroy(object());
- }
+}
- void pointer_enter(uint32_t serial, struct wl_surface *surface,
- wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
- void pointer_leave(uint32_t time, struct wl_surface *surface);
- void pointer_motion(uint32_t time,
- wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
- void pointer_button(uint32_t serial, uint32_t time,
- uint32_t button, uint32_t state) Q_DECL_OVERRIDE;
- void pointer_axis(uint32_t time,
- uint32_t axis,
- wl_fixed_t value) Q_DECL_OVERRIDE;
-
- QWaylandInputDevice *mParent;
- QWaylandWindow *mFocus;
- uint32_t mEnterSerial;
- uint32_t mCursorSerial;
- QPointF mSurfacePos;
- QPointF mGlobalPos;
- Qt::MouseButtons mButtons;
-};
+QWaylandInputDevice::Touch::Touch(QWaylandInputDevice *p)
+ : mParent(p)
+ , mFocus(0)
+{
+}
-class QWaylandInputDevice::Touch : public QtWayland::wl_touch
+QWaylandInputDevice::Touch::~Touch()
{
-public:
- Touch(QWaylandInputDevice *p)
- : mParent(p)
- , mFocus(0)
- {
- }
- ~Touch()
- {
+ if (mParent->mVersion >= 3)
+ wl_touch_release(object());
+ else
wl_touch_destroy(object());
- }
-
- void touch_down(uint32_t serial,
- uint32_t time,
- struct wl_surface *surface,
- int32_t id,
- wl_fixed_t x,
- wl_fixed_t y) Q_DECL_OVERRIDE;
- void touch_up(uint32_t serial,
- uint32_t time,
- int32_t id) Q_DECL_OVERRIDE;
- void touch_motion(uint32_t time,
- int32_t id,
- wl_fixed_t x,
- wl_fixed_t y) Q_DECL_OVERRIDE;
- void touch_frame() Q_DECL_OVERRIDE;
- void touch_cancel() Q_DECL_OVERRIDE;
-
- bool allTouchPointsReleased();
-
- QWaylandInputDevice *mParent;
- QWaylandWindow *mFocus;
- QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
- QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
-};
+}
QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version, uint32_t id)
: QObject()
- , QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 2))
+ , QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 3))
, mQDisplay(display)
, mDisplay(display->wl_display())
+ , mVersion(qMin(version, 3))
, mCaps(0)
, mDataDevice(0)
, mKeyboard(0)
@@ -246,7 +183,6 @@ QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version,
mDataDevice = mQDisplay->dndSelectionHandler()->getDataDevice(this);
}
- connect(&mRepeatTimer, SIGNAL(timeout()), this, SLOT(repeatKey()));
}
QWaylandInputDevice::~QWaylandInputDevice()
@@ -261,16 +197,15 @@ void QWaylandInputDevice::seat_capabilities(uint32_t caps)
mCaps = caps;
if (caps & WL_SEAT_CAPABILITY_KEYBOARD && !mKeyboard) {
- mKeyboard = new Keyboard(this);
+ mKeyboard = createKeyboard(this);
mKeyboard->init(get_keyboard());
} else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && mKeyboard) {
delete mKeyboard;
mKeyboard = 0;
- mRepeatTimer.stop();
}
if (caps & WL_SEAT_CAPABILITY_POINTER && !mPointer) {
- mPointer = new Pointer(this);
+ mPointer = createPointer(this);
mPointer->init(get_pointer());
pointerSurface = mQDisplay->createSurface(this);
} else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && mPointer) {
@@ -279,7 +214,7 @@ void QWaylandInputDevice::seat_capabilities(uint32_t caps)
}
if (caps & WL_SEAT_CAPABILITY_TOUCH && !mTouch) {
- mTouch = new Touch(this);
+ mTouch = createTouch(this);
mTouch->init(get_touch());
if (!mTouchDevice) {
@@ -294,13 +229,28 @@ void QWaylandInputDevice::seat_capabilities(uint32_t caps)
}
}
+QWaylandInputDevice::Keyboard *QWaylandInputDevice::createKeyboard(QWaylandInputDevice *device)
+{
+ return new Keyboard(device);
+}
+
+QWaylandInputDevice::Pointer *QWaylandInputDevice::createPointer(QWaylandInputDevice *device)
+{
+ return new Pointer(device);
+}
+
+QWaylandInputDevice::Touch *QWaylandInputDevice::createTouch(QWaylandInputDevice *device)
+{
+ return new Touch(device);
+}
+
void QWaylandInputDevice::handleWindowDestroyed(QWaylandWindow *window)
{
if (mPointer && window == mPointer->mFocus)
mPointer->mFocus = 0;
if (mKeyboard && window == mKeyboard->mFocus) {
mKeyboard->mFocus = 0;
- mRepeatTimer.stop();
+ mKeyboard->stopRepeat();
}
}
@@ -341,20 +291,26 @@ Qt::KeyboardModifiers QWaylandInputDevice::modifiers() const
if (!mKeyboard)
return Qt::NoModifier;
+ return mKeyboard->modifiers();
+}
+
+Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const
+{
Qt::KeyboardModifiers ret = Qt::NoModifier;
#ifndef QT_NO_WAYLAND_XKB
+ if (!mXkbState)
+ return ret;
+
xkb_state_component cstate = static_cast<xkb_state_component>(XKB_STATE_DEPRESSED | XKB_STATE_LATCHED);
- if (xkb_state_mod_name_is_active(mKeyboard->mXkbState, "Shift", cstate))
+ if (xkb_state_mod_name_is_active(mXkbState, XKB_MOD_NAME_SHIFT, cstate))
ret |= Qt::ShiftModifier;
- if (xkb_state_mod_name_is_active(mKeyboard->mXkbState, "Control", cstate))
+ if (xkb_state_mod_name_is_active(mXkbState, XKB_MOD_NAME_CTRL, cstate))
ret |= Qt::ControlModifier;
- if (xkb_state_mod_name_is_active(mKeyboard->mXkbState, "Alt", cstate))
- ret |= Qt::AltModifier;
- if (xkb_state_mod_name_is_active(mKeyboard->mXkbState, "Mod1", cstate))
+ if (xkb_state_mod_name_is_active(mXkbState, XKB_MOD_NAME_ALT, cstate))
ret |= Qt::AltModifier;
- if (xkb_state_mod_name_is_active(mKeyboard->mXkbState, "Mod4", cstate))
+ if (xkb_state_mod_name_is_active(mXkbState, XKB_MOD_NAME_LOGO, cstate))
ret |= Qt::MetaModifier;
#endif
@@ -398,12 +354,17 @@ void QWaylandInputDevice::setCursor(struct wl_buffer *buffer, struct wl_cursor_i
}
}
+class EnterEvent : public QWaylandPointerEvent
+{
+public:
+ EnterEvent(const QPointF &l, const QPointF &g)
+ : QWaylandPointerEvent(QWaylandPointerEvent::Enter, 0, l, g, 0, Qt::NoModifier)
+ {}
+};
+
void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surface *surface,
wl_fixed_t sx, wl_fixed_t sy)
{
- Q_UNUSED(sx);
- Q_UNUSED(sy);
-
if (!surface)
return;
@@ -411,15 +372,16 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
window->window()->setCursor(window->window()->cursor());
mFocus = window;
+ mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
+ mGlobalPos = window->window()->mapToGlobal(mSurfacePos.toPoint());
- mParent->mTime = QWaylandDisplay::currentTimeMillisec();
mParent->mSerial = serial;
mEnterSerial = serial;
QWaylandWindow *grab = QWaylandWindow::mouseGrab();
if (!grab) {
- window->handleMouseEnter(mParent);
- window->handleMouse(mParent, mParent->mTime, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ EnterEvent evt(mSurfacePos, mGlobalPos);
+ window->handleMouse(mParent, evt);
}
}
@@ -440,11 +402,17 @@ void QWaylandInputDevice::Pointer::pointer_leave(uint32_t time, struct wl_surfac
mParent->mTime = time;
}
-void QWaylandInputDevice::Pointer::pointer_motion(uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y)
+class MotionEvent : public QWaylandPointerEvent
{
- Q_UNUSED(surface_x);
- Q_UNUSED(surface_y);
+public:
+ MotionEvent(ulong t, const QPointF &l, const QPointF &g, Qt::MouseButtons b, Qt::KeyboardModifiers m)
+ : QWaylandPointerEvent(QWaylandPointerEvent::Motion, t, l, g, b, m)
+ {
+ }
+};
+void QWaylandInputDevice::Pointer::pointer_motion(uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y)
+{
QWaylandWindow *window = mFocus;
if (window == NULL) {
@@ -468,9 +436,12 @@ void QWaylandInputDevice::Pointer::pointer_motion(uint32_t time, wl_fixed_t surf
// so we just set it outside of the window boundaries.
pos = QPointF(-1, -1);
global = grab->window()->mapToGlobal(pos.toPoint());
- grab->handleMouse(mParent, time, pos, global, mButtons, mParent->modifiers());
- } else
- window->handleMouse(mParent, time, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ MotionEvent e(time, pos, global, mButtons, mParent->modifiers());
+ grab->handleMouse(mParent, e);
+ } else {
+ MotionEvent e(time, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ window->handleMouse(mParent, e);
+ }
}
void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time,
@@ -515,9 +486,12 @@ void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time
if (grab && grab != mFocus) {
QPointF pos = QPointF(-1, -1);
QPointF global = grab->window()->mapToGlobal(pos.toPoint());
- grab->handleMouse(mParent, time, pos, global, mButtons, mParent->modifiers());
- } else if (window)
- window->handleMouse(mParent, time, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ MotionEvent e(time, pos, global, mButtons, mParent->modifiers());
+ grab->handleMouse(mParent, e);
+ } else if (window) {
+ MotionEvent e(time, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ window->handleMouse(mParent, e);
+ }
}
void QWaylandInputDevice::Pointer::pointer_axis(uint32_t time, uint32_t axis, int32_t value)
@@ -623,6 +597,30 @@ static const uint32_t KeyTbl[] = {
XKB_KEY_Mode_switch, Qt::Key_Mode_switch,
XKB_KEY_script_switch, Qt::Key_Mode_switch,
+ XKB_KEY_XF86Back, Qt::Key_Back,
+ XKB_KEY_XF86Forward, Qt::Key_Forward,
+
+ XKB_KEY_XF86AudioPlay, Qt::Key_MediaTogglePlayPause, //there isn't a PlayPause keysym, however just play keys are not common
+ XKB_KEY_XF86AudioPause, Qt::Key_MediaPause,
+ XKB_KEY_XF86AudioStop, Qt::Key_MediaStop,
+ XKB_KEY_XF86AudioPrev, Qt::Key_MediaPrevious,
+ XKB_KEY_XF86AudioNext, Qt::Key_MediaNext,
+ XKB_KEY_XF86AudioRewind, Qt::Key_MediaPrevious,
+ XKB_KEY_XF86AudioForward, Qt::Key_MediaNext,
+ XKB_KEY_XF86AudioRecord, Qt::Key_MediaRecord,
+
+ XKB_KEY_XF86AudioMute, Qt::Key_VolumeMute,
+ XKB_KEY_XF86AudioLowerVolume, Qt::Key_VolumeDown,
+ XKB_KEY_XF86AudioRaiseVolume, Qt::Key_VolumeUp,
+
+ XKB_KEY_XF86AudioRandomPlay, Qt::Key_AudioRandomPlay,
+ XKB_KEY_XF86AudioRepeat, Qt::Key_AudioRepeat,
+
+ XKB_KEY_XF86ZoomIn, Qt::Key_ZoomIn,
+ XKB_KEY_XF86ZoomOut, Qt::Key_ZoomOut,
+
+ XKB_KEY_XF86Eject, Qt::Key_Eject,
+
0, 0
};
@@ -683,6 +681,11 @@ void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd,
return;
}
+ // Release the old keymap resources in the case they were already created in
+ // the key event or when the compositor issues a new map
+ releaseKeyMap();
+
+ mXkbContext = xkb_context_new(xkb_context_flags(0));
mXkbMap = xkb_map_new_from_string(mXkbContext, map_str, XKB_KEYMAP_FORMAT_TEXT_V1, (xkb_keymap_compile_flags)0);
munmap(map_str, size);
close(fd);
@@ -732,7 +735,7 @@ void QWaylandInputDevice::Keyboard::keyboard_leave(uint32_t time, struct wl_surf
mFocusCallback = wl_display_sync(mParent->mDisplay);
wl_callback_add_listener(mFocusCallback, &QWaylandInputDevice::Keyboard::callback, this);
}
- mParent->mRepeatTimer.stop();
+ mRepeatTimer.stop();
}
const wl_callback_listener QWaylandInputDevice::Keyboard::callback = {
@@ -773,11 +776,11 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
mParent->mQDisplay->setLastInputDevice(mParent, serial, window);
#ifndef QT_NO_WAYLAND_XKB
- if (!mXkbMap)
+ if (!createDefaultKeyMap()) {
return;
+ }
const xkb_keysym_t sym = xkb_state_key_get_one_sym(mXkbState, code);
- xkb_state_update_key(mXkbState, code, isDown ? XKB_KEY_DOWN : XKB_KEY_UP);
Qt::KeyboardModifiers modifiers = mParent->modifiers();
@@ -812,38 +815,37 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
#ifndef QT_NO_WAYLAND_XKB
mRepeatSym = sym;
#endif
- mParent->mRepeatTimer.setInterval(400);
- mParent->mRepeatTimer.start();
+ mRepeatTimer.setInterval(400);
+ mRepeatTimer.start();
} else if (mRepeatCode == code) {
- mParent->mRepeatTimer.stop();
+ mRepeatTimer.stop();
}
}
-void QWaylandInputDevice::repeatKey()
+void QWaylandInputDevice::Keyboard::repeatKey()
{
mRepeatTimer.setInterval(25);
-
- QWindowSystemInterface::handleExtendedKeyEvent(mKeyboard->mFocus->window(),
- mKeyboard->mRepeatTime, QEvent::KeyRelease, mKeyboard->mRepeatKey,
+ QWindowSystemInterface::handleExtendedKeyEvent(mFocus->window(),
+ mRepeatTime, QEvent::KeyRelease, mRepeatKey,
modifiers(),
- mKeyboard->mRepeatCode,
+ mRepeatCode,
#ifndef QT_NO_WAYLAND_XKB
- mKeyboard->mRepeatSym, mKeyboard->mNativeModifiers,
+ mRepeatSym, mNativeModifiers,
#else
0, 0,
#endif
- mKeyboard->mRepeatText, true);
+ mRepeatText, true);
- QWindowSystemInterface::handleExtendedKeyEvent(mKeyboard->mFocus->window(),
- mKeyboard->mRepeatTime, QEvent::KeyPress, mKeyboard->mRepeatKey,
+ QWindowSystemInterface::handleExtendedKeyEvent(mFocus->window(),
+ mRepeatTime, QEvent::KeyPress, mRepeatKey,
modifiers(),
- mKeyboard->mRepeatCode,
+ mRepeatCode,
#ifndef QT_NO_WAYLAND_XKB
- mKeyboard->mRepeatSym, mKeyboard->mNativeModifiers,
+ mRepeatSym, mNativeModifiers,
#else
0, 0,
#endif
- mKeyboard->mRepeatText, true);
+ mRepeatText, true);
}
void QWaylandInputDevice::Keyboard::keyboard_modifiers(uint32_t serial,
@@ -1009,4 +1011,6 @@ void QWaylandInputDevice::Touch::touch_frame()
mTouchPoints.clear();
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 630640f87..23172ad3c 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -56,15 +48,18 @@
#include <QtWaylandClient/private/qwayland-wayland.h>
#ifndef QT_NO_WAYLAND_XKB
-struct xkb_context;
-struct xkb_keymap;
-struct xkb_state;
+#include <xkbcommon/xkbcommon.h>
+#include <xkbcommon/xkbcommon-keysyms.h>
#endif
+#include <QtCore/QDebug>
+
struct wl_cursor_image;
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandDisplay;
class QWaylandDataDevice;
@@ -75,6 +70,10 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice
{
Q_OBJECT
public:
+ class Keyboard;
+ class Pointer;
+ class Touch;
+
QWaylandInputDevice(QWaylandDisplay *display, int version, uint32_t id);
~QWaylandInputDevice();
@@ -100,17 +99,15 @@ public:
uint32_t serial() const;
uint32_t cursorSerial() const;
-private slots:
- void repeatKey();
+ virtual Keyboard *createKeyboard(QWaylandInputDevice *device);
+ virtual Pointer *createPointer(QWaylandInputDevice *device);
+ virtual Touch *createTouch(QWaylandInputDevice *device);
private:
- class Keyboard;
- class Pointer;
- class Touch;
-
QWaylandDisplay *mQDisplay;
struct wl_display *mDisplay;
+ int mVersion;
uint32_t mCaps;
struct wl_surface *pointerSurface;
@@ -123,7 +120,6 @@ private:
uint32_t mTime;
uint32_t mSerial;
- QTimer mRepeatTimer;
void seat_capabilities(uint32_t caps) Q_DECL_OVERRIDE;
void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state);
@@ -139,6 +135,151 @@ inline uint32_t QWaylandInputDevice::serial() const
return mSerial;
}
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Keyboard : public QObject, public QtWayland::wl_keyboard
+{
+ Q_OBJECT
+
+public:
+ Keyboard(QWaylandInputDevice *p);
+ virtual ~Keyboard();
+
+ void stopRepeat();
+
+ void keyboard_keymap(uint32_t format,
+ int32_t fd,
+ uint32_t size) Q_DECL_OVERRIDE;
+ void keyboard_enter(uint32_t time,
+ struct wl_surface *surface,
+ struct wl_array *keys) Q_DECL_OVERRIDE;
+ void keyboard_leave(uint32_t time,
+ struct wl_surface *surface) Q_DECL_OVERRIDE;
+ void keyboard_key(uint32_t serial, uint32_t time,
+ uint32_t key, uint32_t state) Q_DECL_OVERRIDE;
+ void keyboard_modifiers(uint32_t serial,
+ uint32_t mods_depressed,
+ uint32_t mods_latched,
+ uint32_t mods_locked,
+ uint32_t group) Q_DECL_OVERRIDE;
+
+ QWaylandInputDevice *mParent;
+ QWaylandWindow *mFocus;
+#ifndef QT_NO_WAYLAND_XKB
+ xkb_context *mXkbContext;
+ xkb_keymap *mXkbMap;
+ xkb_state *mXkbState;
+#endif
+ struct wl_callback *mFocusCallback;
+ uint32_t mNativeModifiers;
+
+ int mRepeatKey;
+ uint32_t mRepeatCode;
+ uint32_t mRepeatTime;
+ QString mRepeatText;
+#ifndef QT_NO_WAYLAND_XKB
+ xkb_keysym_t mRepeatSym;
+#endif
+ QTimer mRepeatTimer;
+
+ static const wl_callback_listener callback;
+ static void focusCallback(void *data, struct wl_callback *callback, uint32_t time);
+
+ Qt::KeyboardModifiers modifiers() const;
+
+private slots:
+ void repeatKey();
+
+private:
+#ifndef QT_NO_WAYLAND_XKB
+ bool createDefaultKeyMap();
+ void releaseKeyMap();
+#endif
+
+};
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Pointer : public QtWayland::wl_pointer
+{
+
+public:
+ Pointer(QWaylandInputDevice *p);
+ virtual ~Pointer();
+
+ void pointer_enter(uint32_t serial, struct wl_surface *surface,
+ wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
+ void pointer_leave(uint32_t time, struct wl_surface *surface);
+ void pointer_motion(uint32_t time,
+ wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
+ void pointer_button(uint32_t serial, uint32_t time,
+ uint32_t button, uint32_t state) Q_DECL_OVERRIDE;
+ void pointer_axis(uint32_t time,
+ uint32_t axis,
+ wl_fixed_t value) Q_DECL_OVERRIDE;
+
+ QWaylandInputDevice *mParent;
+ QWaylandWindow *mFocus;
+ uint32_t mEnterSerial;
+ uint32_t mCursorSerial;
+ QPointF mSurfacePos;
+ QPointF mGlobalPos;
+ Qt::MouseButtons mButtons;
+};
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_touch
+{
+public:
+ Touch(QWaylandInputDevice *p);
+ virtual ~Touch();
+
+ void touch_down(uint32_t serial,
+ uint32_t time,
+ struct wl_surface *surface,
+ int32_t id,
+ wl_fixed_t x,
+ wl_fixed_t y) Q_DECL_OVERRIDE;
+ void touch_up(uint32_t serial,
+ uint32_t time,
+ int32_t id) Q_DECL_OVERRIDE;
+ void touch_motion(uint32_t time,
+ int32_t id,
+ wl_fixed_t x,
+ wl_fixed_t y) Q_DECL_OVERRIDE;
+ void touch_frame() Q_DECL_OVERRIDE;
+ void touch_cancel() Q_DECL_OVERRIDE;
+
+ bool allTouchPointsReleased();
+
+ QWaylandInputDevice *mParent;
+ QWaylandWindow *mFocus;
+ QList<QWindowSystemInterface::TouchPoint> mTouchPoints;
+ QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
+};
+
+class QWaylandPointerEvent
+{
+public:
+ enum Type {
+ Enter,
+ Motion
+ };
+ inline QWaylandPointerEvent(Type t, ulong ts, const QPointF &l, const QPointF &g, Qt::MouseButtons b, Qt::KeyboardModifiers m)
+ : type(t)
+ , timestamp(ts)
+ , local(l)
+ , global(g)
+ , buttons(b)
+ , modifiers(m)
+ {}
+
+ Type type;
+ ulong timestamp;
+ QPointF local;
+ QPointF global;
+ Qt::MouseButtons buttons;
+ Qt::KeyboardModifiers modifiers;
+};
+
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index aa5a1cea8..9526aec4c 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,7 @@
#include "qwaylanddisplay_p.h"
#include "qwaylandshmwindow_p.h"
+#include "qwaylandinputdevice_p.h"
#include "qwaylandinputcontext_p.h"
#include "qwaylandshmbackingstore_p.h"
#include "qwaylandnativeinterface_p.h"
@@ -76,8 +69,13 @@
#include "qwaylandshellintegration_p.h"
#include "qwaylandshellintegrationfactory_p.h"
+#include "qwaylandinputdeviceintegration_p.h"
+#include "qwaylandinputdeviceintegrationfactory_p.h"
+
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class GenericWaylandTheme: public QGenericUnixTheme
{
public:
@@ -113,6 +111,7 @@ public:
QWaylandIntegration::QWaylandIntegration()
: mClientBufferIntegration(0)
, mShellIntegration(Q_NULLPTR)
+ , mInputDeviceIntegration(Q_NULLPTR)
, mFontDb(new QGenericUnixFontDatabase())
, mNativeInterface(new QWaylandNativeInterface(this))
#ifndef QT_NO_ACCESSIBILITY
@@ -124,6 +123,7 @@ QWaylandIntegration::QWaylandIntegration()
, mServerBufferIntegrationInitialized(false)
, mShellIntegrationInitialized(false)
{
+ initializeInputDeviceIntegration();
mDisplay = new QWaylandDisplay(this);
mClipboard = new QWaylandClipboard(mDisplay);
mDrag = new QWaylandDrag(mDisplay);
@@ -226,6 +226,13 @@ QVariant QWaylandIntegration::styleHint(StyleHint hint) const
if (hint == ShowIsFullScreen && mDisplay->windowManagerIntegration())
return mDisplay->windowManagerIntegration()->showIsFullScreen();
+ switch (hint) {
+ case QPlatformIntegration::FontSmoothingGamma:
+ return qreal(1.0);
+ default:
+ break;
+ }
+
return QPlatformIntegration::styleHint(hint);
}
@@ -363,4 +370,32 @@ void QWaylandIntegration::initializeShellIntegration()
}
}
+QWaylandInputDevice *QWaylandIntegration::createInputDevice(QWaylandDisplay *display, int version, uint32_t id)
+{
+ if (mInputDeviceIntegration) {
+ return mInputDeviceIntegration->createInputDevice(display, version, id);
+ }
+ return new QWaylandInputDevice(display, version, id);
+}
+
+void QWaylandIntegration::initializeInputDeviceIntegration()
+{
+ QByteArray integrationName = qgetenv("QT_WAYLAND_INPUTDEVICE_INTEGRATION");
+ QString targetKey = QString::fromLocal8Bit(integrationName);
+
+ if (targetKey.isEmpty()) {
+ return;
+ }
+
+ QStringList keys = QWaylandInputDeviceIntegrationFactory::keys();
+ if (keys.contains(targetKey)) {
+ mInputDeviceIntegration = QWaylandInputDeviceIntegrationFactory::create(targetKey, QStringList());
+ qDebug("Using the '%s' input device integration", qPrintable(targetKey));
+ } else {
+ qWarning("Wayland inputdevice integration '%s' not found, using default", qPrintable(targetKey));
+ }
+}
+
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 699702482..ef180cdaf 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,11 +39,15 @@
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandBuffer;
class QWaylandDisplay;
class QWaylandClientBufferIntegration;
class QWaylandServerBufferIntegration;
class QWaylandShellIntegration;
+class QWaylandInputDeviceIntegration;
+class QWaylandInputDevice;
class Q_WAYLAND_CLIENT_EXPORT QWaylandIntegration : public QPlatformIntegration
{
@@ -91,17 +87,24 @@ public:
QPlatformTheme *createPlatformTheme(const QString &name) const;
+ QWaylandInputDevice *createInputDevice(QWaylandDisplay *display, int version, uint32_t id);
+
virtual QWaylandClientBufferIntegration *clientBufferIntegration() const;
virtual QWaylandServerBufferIntegration *serverBufferIntegration() const;
virtual QWaylandShellIntegration *shellIntegration() const;
+
protected:
QWaylandClientBufferIntegration *mClientBufferIntegration;
QWaylandServerBufferIntegration *mServerBufferIntegration;
QWaylandShellIntegration *mShellIntegration;
+ QWaylandInputDeviceIntegration *mInputDeviceIntegration;
+
private:
void initializeClientBufferIntegration();
void initializeServerBufferIntegration();
void initializeShellIntegration();
+ void initializeInputDeviceIntegration();
+
QPlatformFontDatabase *mFontDb;
QPlatformClipboard *mClipboard;
QPlatformDrag *mDrag;
@@ -116,6 +119,8 @@ private:
friend class QWaylandDisplay;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp
index 3d714c2fb..8170c39f1 100644
--- a/src/client/qwaylandnativeinterface.cpp
+++ b/src/client/qwaylandnativeinterface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,9 +41,12 @@
#include "qwaylandscreen_p.h"
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/QScreen>
+#include <QtWaylandClient/private/qwaylandclientbufferintegration_p.h>
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandNativeInterface::QWaylandNativeInterface(QWaylandIntegration *integration)
: m_integration(integration)
{
@@ -61,13 +56,18 @@ void *QWaylandNativeInterface::nativeResourceForIntegration(const QByteArray &re
{
QByteArray lowerCaseResource = resourceString.toLower();
- if (lowerCaseResource == "display" || lowerCaseResource == "wl_display")
+ if (lowerCaseResource == "display" || lowerCaseResource == "wl_display" || lowerCaseResource == "nativedisplay")
return m_integration->display()->wl_display();
+ if (lowerCaseResource == "wl_event_queue")
+ return m_integration->display()->wl_event_queue();
if (lowerCaseResource == "compositor")
return const_cast<wl_compositor *>(m_integration->display()->wl_compositor());
if (lowerCaseResource == "server_buffer_integration")
return m_integration->serverBufferIntegration();
+ if (lowerCaseResource == "egldisplay" && m_integration->clientBufferIntegration())
+ return m_integration->clientBufferIntegration()->nativeResource(QWaylandClientBufferIntegration::EglDisplay);
+
return 0;
}
@@ -82,6 +82,8 @@ void *QWaylandNativeInterface::nativeResourceForWindow(const QByteArray &resourc
if (lowerCaseResource == "surface") {
return ((QWaylandWindow *) window->handle())->object();
}
+ if (lowerCaseResource == "egldisplay" && m_integration->clientBufferIntegration())
+ return m_integration->clientBufferIntegration()->nativeResource(QWaylandClientBufferIntegration::EglDisplay);
return NULL;
}
@@ -96,6 +98,22 @@ void *QWaylandNativeInterface::nativeResourceForScreen(const QByteArray &resourc
return NULL;
}
+void *QWaylandNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
+{
+ QByteArray lowerCaseResource = resource.toLower();
+
+ if (lowerCaseResource == "eglconfig" && m_integration->clientBufferIntegration())
+ return m_integration->clientBufferIntegration()->nativeResourceForContext(QWaylandClientBufferIntegration::EglConfig, context->handle());
+
+ if (lowerCaseResource == "eglcontext" && m_integration->clientBufferIntegration())
+ return m_integration->clientBufferIntegration()->nativeResourceForContext(QWaylandClientBufferIntegration::EglContext, context->handle());
+
+ if (lowerCaseResource == "egldisplay" && m_integration->clientBufferIntegration())
+ return m_integration->clientBufferIntegration()->nativeResourceForContext(QWaylandClientBufferIntegration::EglDisplay, context->handle());
+
+ return 0;
+}
+
QVariantMap QWaylandNativeInterface::windowProperties(QPlatformWindow *window) const
{
QWaylandWindow *waylandWindow = static_cast<QWaylandWindow *>(window);
@@ -125,4 +143,6 @@ void QWaylandNativeInterface::emitWindowPropertyChanged(QPlatformWindow *window,
emit windowPropertyChanged(window,name);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h
index 6c0be2d3c..04a46075d 100644
--- a/src/client/qwaylandnativeinterface_p.h
+++ b/src/client/qwaylandnativeinterface_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandIntegration;
class QWaylandScreen;
@@ -61,6 +55,7 @@ public:
QWindow *window);
void *nativeResourceForScreen(const QByteArray &resourceString,
QScreen *screen);
+ void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context);
QVariantMap windowProperties(QPlatformWindow *window) const;
QVariant windowProperty(QPlatformWindow *window, const QString &name) const;
@@ -74,6 +69,8 @@ private:
QHash<QPlatformWindow*, QVariantMap> m_windowProperties;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDNATIVEINTERFACE_H
diff --git a/src/client/qwaylandqtkey.cpp b/src/client/qwaylandqtkey.cpp
index 16562357f..51534e605 100644
--- a/src/client/qwaylandqtkey.cpp
+++ b/src/client/qwaylandqtkey.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,6 +37,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandQtKeyExtension::QWaylandQtKeyExtension(QWaylandDisplay *display, uint32_t id)
: QtWayland::qt_key_extension(display->wl_registry(), id, 2)
, m_display(display)
@@ -83,4 +77,6 @@ void QWaylandQtKeyExtension::key_extension_qtkey(struct wl_surface *surface,
autorep, count);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandqtkey_p.h b/src/client/qwaylandqtkey_p.h
index d00a90ee0..322549d5b 100644
--- a/src/client/qwaylandqtkey_p.h
+++ b/src/client/qwaylandqtkey_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class Q_WAYLAND_CLIENT_EXPORT QWaylandQtKeyExtension : public QtWayland::qt_key_extension
@@ -73,6 +67,8 @@ private:
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDQTKEY_H
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index ad10b7a02..acd125c62 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,12 +45,15 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id)
: QPlatformScreen()
, QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2))
, m_outputId(id)
, mWaylandDisplay(waylandDisplay)
, mExtendedOutput(0)
+ , mScale(1)
, mDepth(32)
, mRefreshRate(60000)
, mTransform(-1)
@@ -83,7 +78,9 @@ QWaylandDisplay * QWaylandScreen::display() const
QRect QWaylandScreen::geometry() const
{
- return mGeometry;
+ // Scale geometry for QScreen. This makes window and screen
+ // geometry be in the same coordinate system.
+ return QRect(mGeometry.topLeft(), mGeometry.size() / mScale);
}
int QWaylandScreen::depth() const
@@ -135,6 +132,16 @@ Qt::ScreenOrientation QWaylandScreen::orientation() const
return m_orientation;
}
+int QWaylandScreen::scale() const
+{
+ return mScale;
+}
+
+qreal QWaylandScreen::devicePixelRatio() const
+{
+ return qreal(mScale);
+}
+
qreal QWaylandScreen::refreshRate() const
{
return mRefreshRate / 1000.f;
@@ -196,6 +203,11 @@ void QWaylandScreen::output_geometry(int32_t x, int32_t y,
mGeometry.moveTopLeft(QPoint(x, y));
}
+void QWaylandScreen::output_scale(int32_t factor)
+{
+ mScale = factor;
+}
+
void QWaylandScreen::output_done()
{
// the done event is sent after all the geometry and the mode events are sent,
@@ -232,4 +244,6 @@ void QWaylandScreen::output_done()
QWindowSystemInterface::handleScreenRefreshRateChange(screen(), refreshRate());
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index 9338c2717..35adee34a 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandCursor;
class QWaylandExtendedOutput;
@@ -73,6 +67,8 @@ public:
void setOrientationUpdateMask(Qt::ScreenOrientations mask);
Qt::ScreenOrientation orientation() const;
+ int scale() const;
+ qreal devicePixelRatio() const Q_DECL_OVERRIDE;
qreal refreshRate() const;
QString name() const { return mOutputName; }
@@ -96,12 +92,14 @@ private:
const QString &make,
const QString &model,
int32_t transform) Q_DECL_OVERRIDE;
+ void output_scale(int32_t factor) Q_DECL_OVERRIDE;
void output_done() Q_DECL_OVERRIDE;
int m_outputId;
QWaylandDisplay *mWaylandDisplay;
QWaylandExtendedOutput *mExtendedOutput;
QRect mGeometry;
+ int mScale;
int mDepth;
int mRefreshRate;
int mTransform;
@@ -113,6 +111,8 @@ private:
QWaylandCursor *mWaylandCursor;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSCREEN_H
diff --git a/src/client/qwaylandshellsurface.cpp b/src/client/qwaylandshellsurface.cpp
index a3855dac0..f90ed0597 100644
--- a/src/client/qwaylandshellsurface.cpp
+++ b/src/client/qwaylandshellsurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,10 @@
#include "qwaylandwindow_p.h"
#include "qwaylandextendedsurface_p.h"
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
QWaylandShellSurface::QWaylandShellSurface(QWaylandWindow *window)
: m_window(window)
{
@@ -58,3 +54,7 @@ void QWaylandShellSurface::sendProperty(const QString &name, const QVariant &val
Q_UNUSED(name)
Q_UNUSED(value)
}
+
+}
+
+QT_END_NAMESPACE
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h
index 1f2346a9b..2fb7ff9af 100644
--- a/src/client/qwaylandshellsurface_p.h
+++ b/src/client/qwaylandshellsurface_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,9 +45,12 @@
QT_BEGIN_NAMESPACE
class QVariant;
+class QWindow;
+
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandInputDevice;
-class QWindow;
class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface : public QObject
{
@@ -96,6 +91,8 @@ private:
friend class QWaylandWindow;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSHELLSURFACE_H
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index 598e9f160..f009e0811 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,9 @@
#include <QMutexLocker>
#include <wayland-client.h>
+#include <wayland-client-protocol.h>
+#include "qwaylandshmformathelper.h"
+
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@@ -56,8 +51,10 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
- const QSize &size, QImage::Format format)
+ const QSize &size, QImage::Format format, int scale)
: mShmPool(0)
, mMarginsImage(0)
{
@@ -88,10 +85,13 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
return;
}
+ wl_shm_format wl_format = QWaylandShmFormatHelper::fromQImageFormat(format);
mImage = QImage(data, size.width(), size.height(), stride, format);
+ mImage.setDevicePixelRatio(qreal(scale));
+
mShmPool = wl_shm_create_pool(display->shm(), fd, alloc);
mBuffer = wl_shm_pool_create_buffer(mShmPool,0, size.width(), size.height(),
- stride, WL_SHM_FORMAT_ARGB8888);
+ stride, wl_format);
close(fd);
}
@@ -106,8 +106,10 @@ QWaylandShmBuffer::~QWaylandShmBuffer(void)
wl_shm_pool_destroy(mShmPool);
}
-QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &margins)
+QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &marginsIn)
{
+ QMargins margins = marginsIn * int(mImage.devicePixelRatio());
+
if (!margins.isNull() && margins != mMargins) {
if (mMarginsImage) {
delete mMarginsImage;
@@ -117,6 +119,7 @@ QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &margins)
int b_s_width = mImage.size().width() - margins.left() - margins.right();
int b_s_height = mImage.size().height() - margins.top() - margins.bottom();
mMarginsImage = new QImage(b_s_data, b_s_width,b_s_height,mImage.bytesPerLine(),mImage.format());
+ mMarginsImage->setDevicePixelRatio(mImage.devicePixelRatio());
}
if (margins.isNull()) {
delete mMarginsImage;
@@ -234,7 +237,7 @@ void QWaylandShmBackingStore::flush(QWindow *window, const QRegion &region, cons
if (damageAll) {
//need to damage it all, otherwise the attach offset may screw up
- waylandWindow()->damage(QRect(QPoint(0,0),mFrontBuffer->size()));
+ waylandWindow()->damage(QRect(QPoint(0,0), window->size()));
} else {
QVector<QRect> rects = region.rects();
for (int i = 0; i < rects.size(); i++) {
@@ -255,7 +258,8 @@ void QWaylandShmBackingStore::resize(const QSize &size, const QRegion &)
void QWaylandShmBackingStore::resize(const QSize &size)
{
QMargins margins = windowDecorationMargins();
- QSize sizeWithMargins = size + QSize(margins.left()+margins.right(),margins.top()+margins.bottom());
+ int scale = waylandWindow()->scale();
+ QSize sizeWithMargins = (size + QSize(margins.left()+margins.right(),margins.top()+margins.bottom())) * scale;
QImage::Format format = QPlatformScreen::platformScreenForWindow(window())->format();
@@ -266,7 +270,7 @@ void QWaylandShmBackingStore::resize(const QSize &size)
delete mBackBuffer; //we delete the attached buffer when we flush
}
- mBackBuffer = new QWaylandShmBuffer(mDisplay, sizeWithMargins, format);
+ mBackBuffer = new QWaylandShmBuffer(mDisplay, sizeWithMargins, format, scale);
if (windowDecoration() && window()->isVisible())
windowDecoration()->update();
@@ -361,7 +365,7 @@ void QWaylandShmBackingStore::done(void *data, wl_callback *callback, uint32_t t
delete window->attached();
}
window->attachOffset(self->mFrontBuffer);
- window->damage(QRect(QPoint(0,0),self->mFrontBuffer->size()));
+ window->damage(QRect(QPoint(0,0),window->geometry().size()));
window->commit();
}
}
@@ -370,4 +374,6 @@ const struct wl_callback_listener QWaylandShmBackingStore::frameCallbackListener
QWaylandShmBackingStore::done
};
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h
index c0d730dee..17e84f3cd 100644
--- a/src/client/qwaylandshmbackingstore_p.h
+++ b/src/client/qwaylandshmbackingstore_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,6 +43,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandAbstractDecoration;
class QWaylandWindow;
@@ -58,9 +52,10 @@ class QWaylandWindow;
class Q_WAYLAND_CLIENT_EXPORT QWaylandShmBuffer : public QWaylandBuffer {
public:
QWaylandShmBuffer(QWaylandDisplay *display,
- const QSize &size, QImage::Format format);
+ const QSize &size, QImage::Format format, int scale = 1);
~QWaylandShmBuffer();
QSize size() const { return mImage.size(); }
+ int scale() const Q_DECL_OVERRIDE { return int(mImage.devicePixelRatio()); }
QImage *image() { return &mImage; }
QImage *imageInsideMargins(const QMargins &margins);
@@ -119,6 +114,8 @@ private:
struct wl_callback *mFrameCallback;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/client/qwaylandshmwindow.cpp b/src/client/qwaylandshmwindow.cpp
index 431ed2fdb..2d34d6e61 100644
--- a/src/client/qwaylandshmwindow.cpp
+++ b/src/client/qwaylandshmwindow.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandShmWindow::QWaylandShmWindow(QWindow *window)
: QWaylandWindow(window)
{
@@ -63,4 +57,6 @@ QWaylandWindow::WindowType QWaylandShmWindow::windowType() const
return QWaylandWindow::Shm;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandshmwindow_p.h b/src/client/qwaylandshmwindow_p.h
index 47ee74269..b046c5d84 100644
--- a/src/client/qwaylandshmwindow_p.h
+++ b/src/client/qwaylandshmwindow_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class Q_WAYLAND_CLIENT_EXPORT QWaylandShmWindow : public QWaylandWindow
{
public:
@@ -57,6 +51,8 @@ public:
QSurfaceFormat format() const { return QSurfaceFormat(); }
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSHMWINDOW_H
diff --git a/src/client/qwaylandsubsurface.cpp b/src/client/qwaylandsubsurface.cpp
index 6db59fa20..81cfef254 100644
--- a/src/client/qwaylandsubsurface.cpp
+++ b/src/client/qwaylandsubsurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandSubSurface::QWaylandSubSurface(QWaylandWindow *window, struct ::qt_sub_surface *sub_surface)
: QtWayland::qt_sub_surface(sub_surface)
, m_window(window)
@@ -88,4 +82,6 @@ void QWaylandSubSurface::adjustPositionOfChildren()
setPositionToParent(m_window);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandsubsurface_p.h b/src/client/qwaylandsubsurface_p.h
index bd0da96d2..232330855 100644
--- a/src/client/qwaylandsubsurface_p.h
+++ b/src/client/qwaylandsubsurface_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandWindow;
class QWaylandSubSurface;
@@ -70,4 +64,6 @@ private:
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDSUBSURFACE_H
diff --git a/src/client/qwaylandtouch.cpp b/src/client/qwaylandtouch.cpp
index 3dabd1ea5..987f18cd1 100644
--- a/src/client/qwaylandtouch.cpp
+++ b/src/client/qwaylandtouch.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,6 +37,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandTouchExtension::QWaylandTouchExtension(QWaylandDisplay *display, uint32_t id)
: QtWayland::qt_touch_extension(display->wl_registry(), id, 1),
mDisplay(display),
@@ -207,4 +201,6 @@ void QWaylandTouchExtension::touch_extension_configure(uint32_t flags)
mFlags = flags;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h
index 20827fa8f..2dda6243a 100644
--- a/src/client/qwaylandtouch_p.h
+++ b/src/client/qwaylandtouch_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandInputDevice;
@@ -95,6 +89,8 @@ private:
QWaylandInputDevice *mInputDevice;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDTOUCH_H
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 83c44c25d..a775080a3 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -67,6 +59,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandWindow *QWaylandWindow::mMouseGrab = 0;
QWaylandWindow::QWaylandWindow(QWindow *window)
@@ -89,6 +83,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
, mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP"))
, mSentInitialResize(false)
, mState(Qt::WindowNoState)
+ , mMask()
, mBackingStore(Q_NULLPTR)
{
init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this)));
@@ -137,9 +132,16 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
mShellSurface->setTopLevel();
}
+ // Enable high-dpi rendering. Scale() returns the screen scale factor and will
+ // typically be integer 1 (normal-dpi) or 2 (high-dpi). Call set_buffer_scale()
+ // to inform the compositor that high-resolution buffers will be provided.
+ if (mDisplay->compositorVersion() >= 3)
+ set_buffer_scale(scale());
+
setOrientationMask(window->screen()->orientationUpdateMask());
setWindowFlags(window->flags());
setGeometry_helper(window->geometry());
+ setMask(window->mask());
setWindowStateInternal(window->windowState());
handleContentOrientationChange(window->contentOrientation());
}
@@ -286,6 +288,24 @@ void QWaylandWindow::lower()
mShellSurface->lower();
}
+void QWaylandWindow::setMask(const QRegion &mask)
+{
+ if (mMask == mask)
+ return;
+
+ mMask = mask;
+
+ if (mMask.isEmpty()) {
+ set_input_region(0);
+ } else {
+ struct ::wl_region *region = mDisplay->createRegion(mMask);
+ set_input_region(region);
+ wl_region_destroy(region);
+ }
+
+ commit();
+}
+
void QWaylandWindow::configure(uint32_t edges, int32_t width, int32_t height)
{
QMutexLocker resizeLocker(&mResizeLock);
@@ -364,7 +384,6 @@ void QWaylandWindow::requestResize()
void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y)
{
mBuffer = buffer;
-
if (mBuffer)
attach(mBuffer->buffer(), x, y);
else
@@ -593,23 +612,24 @@ QWaylandWindow *QWaylandWindow::transientParent() const
return 0;
}
-void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, ulong timestamp, const QPointF &local, const QPointF &global, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
+void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e)
{
if (mWindowDecoration) {
- handleMouseEventWithDecoration(inputDevice, timestamp,local,global,b,mods);
- return;
+ handleMouseEventWithDecoration(inputDevice, e);
+ } else {
+ switch (e.type) {
+ case QWaylandPointerEvent::Enter:
+ QWindowSystemInterface::handleEnterEvent(window(), e.local, e.global);
+ break;
+ case QWaylandPointerEvent::Motion:
+ QWindowSystemInterface::handleMouseEvent(window(), e.timestamp, e.local, e.global, e.buttons, e.modifiers);
+ break;
+ }
}
- QWindowSystemInterface::handleMouseEvent(window(),timestamp,local,global,b,mods);
-}
-
-void QWaylandWindow::handleMouseEnter(QWaylandInputDevice *inputDevice)
-{
- if (!mWindowDecoration) {
- QWindowSystemInterface::handleEnterEvent(window());
- }
- restoreMouseCursor(inputDevice);
+ if (e.type == QWaylandPointerEvent::Enter)
+ restoreMouseCursor(inputDevice);
}
void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
@@ -631,20 +651,23 @@ bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const
return mWindowDecoration->handleTouch(inputDevice, local, global, state, mods);
}
-void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, ulong timestamp, const QPointF &local, const QPointF &global, Qt::MouseButtons b, Qt::KeyboardModifiers mods)
+void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e)
{
if (mMousePressedInContentArea == Qt::NoButton &&
- mWindowDecoration->handleMouse(inputDevice,local,global,b,mods))
+ mWindowDecoration->handleMouse(inputDevice, e.local, e.global, e.buttons, e.modifiers)) {
+ if (mMouseEventsInContentArea)
+ QWindowSystemInterface::handleLeaveEvent(window());
return;
+ }
QMargins marg = frameMargins();
QRect windowRect(0 + marg.left(),
0 + marg.top(),
geometry().size().width() - marg.right(),
geometry().size().height() - marg.bottom());
- if (windowRect.contains(local.toPoint()) || mMousePressedInContentArea != Qt::NoButton) {
- QPointF localTranslated = local;
- QPointF globalTranslated = global;
+ if (windowRect.contains(e.local.toPoint()) || mMousePressedInContentArea != Qt::NoButton) {
+ QPointF localTranslated = e.local;
+ QPointF globalTranslated = e.global;
localTranslated.setX(localTranslated.x() - marg.left());
localTranslated.setY(localTranslated.y() - marg.top());
globalTranslated.setX(globalTranslated.x() - marg.left());
@@ -653,15 +676,23 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
restoreMouseCursor(inputDevice);
QWindowSystemInterface::handleEnterEvent(window());
}
- QWindowSystemInterface::handleMouseEvent(window(), timestamp, localTranslated, globalTranslated, b, mods);
+
+ switch (e.type) {
+ case QWaylandPointerEvent::Enter:
+ QWindowSystemInterface::handleEnterEvent(window(), localTranslated, globalTranslated);
+ break;
+ case QWaylandPointerEvent::Motion:
+ QWindowSystemInterface::handleMouseEvent(window(), e.timestamp, localTranslated, globalTranslated, e.buttons, e.modifiers);
+ break;
+ }
+
mMouseEventsInContentArea = true;
- mMousePressedInContentArea = b;
+ mMousePressedInContentArea = e.buttons;
} else {
if (mMouseEventsInContentArea) {
QWindowSystemInterface::handleLeaveEvent(window());
mMouseEventsInContentArea = false;
}
- mWindowDecoration->handleMouse(inputDevice,local,global,b,mods);
}
}
@@ -699,6 +730,16 @@ bool QWaylandWindow::isExposed() const
return QPlatformWindow::isExposed();
}
+int QWaylandWindow::scale() const
+{
+ return screen()->scale();
+}
+
+qreal QWaylandWindow::devicePixelRatio() const
+{
+ return screen()->devicePixelRatio();
+}
+
bool QWaylandWindow::setMouseGrabEnabled(bool grab)
{
if (window()->type() != Qt::Popup) {
@@ -774,4 +815,6 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa
return m_properties.value(name, defaultValue);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 9ad6fe2f8..1898c4953 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -56,6 +48,8 @@ struct wl_egl_window;
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandDisplay;
class QWaylandBuffer;
class QWaylandShellSurface;
@@ -64,6 +58,7 @@ class QWaylandAbstractDecoration;
class QWaylandInputDevice;
class QWaylandScreen;
class QWaylandShmBackingStore;
+class QWaylandPointerEvent;
class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowConfigure
{
@@ -140,19 +135,18 @@ public:
void raise() Q_DECL_OVERRIDE;
void lower() Q_DECL_OVERRIDE;
+ void setMask(const QRegion &region) Q_DECL_OVERRIDE;
+
+ int scale() const;
+ qreal devicePixelRatio() const Q_DECL_OVERRIDE;
+
void requestActivateWindow() Q_DECL_OVERRIDE;
bool isExposed() const Q_DECL_OVERRIDE;
void unfocus();
QWaylandAbstractDecoration *decoration() const;
- void handleMouse(QWaylandInputDevice *inputDevice,
- ulong timestamp,
- const QPointF & local,
- const QPointF & global,
- Qt::MouseButtons b,
- Qt::KeyboardModifiers mods);
- void handleMouseEnter(QWaylandInputDevice *inputDevice);
+ void handleMouse(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
void handleMouseLeave(QWaylandInputDevice *inputDevice);
bool touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,
@@ -222,6 +216,7 @@ protected:
QIcon mWindowIcon;
Qt::WindowState mState;
+ QRegion mMask;
QWaylandShmBackingStore *mBackingStore;
@@ -229,12 +224,7 @@ private:
bool setWindowStateInternal(Qt::WindowState flags);
void setGeometry_helper(const QRect &rect);
- void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice,
- ulong timestamp,
- const QPointF & local,
- const QPointF & global,
- Qt::MouseButtons b,
- Qt::KeyboardModifiers mods);
+ void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
static const wl_callback_listener callbackListener;
static void frameCallback(void *data, struct wl_callback *wl_callback, uint32_t time);
@@ -255,4 +245,6 @@ inline QPoint QWaylandWindow::attachOffset() const
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDWINDOW_H
diff --git a/src/client/qwaylandwindowmanagerintegration.cpp b/src/client/qwaylandwindowmanagerintegration.cpp
index 174ef93a5..56fe7c5a3 100644
--- a/src/client/qwaylandwindowmanagerintegration.cpp
+++ b/src/client/qwaylandwindowmanagerintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -57,6 +49,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandWindowManagerIntegrationPrivate {
public:
QWaylandWindowManagerIntegrationPrivate(QWaylandDisplay *waylandDisplay);
@@ -157,4 +151,6 @@ bool QWaylandWindowManagerIntegration::openDocument(const QUrl &url)
return true;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandwindowmanagerintegration_p.h b/src/client/qwaylandwindowmanagerintegration_p.h
index 0ad2e38df..612cda43e 100644
--- a/src/client/qwaylandwindowmanagerintegration_p.h
+++ b/src/client/qwaylandwindowmanagerintegration_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,6 +45,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandDisplay;
@@ -87,4 +81,6 @@ private:
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDWINDOWMANAGERINTEGRATION_H
diff --git a/src/client/qwaylandwlshellsurface.cpp b/src/client/qwaylandwlshellsurface.cpp
index 39505e1d8..8888dbf4d 100644
--- a/src/client/qwaylandwlshellsurface.cpp
+++ b/src/client/qwaylandwlshellsurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window)
: QtWayland::wl_shell_surface(shell_surface)
, QWaylandShellSurface(window)
@@ -225,4 +219,6 @@ void QWaylandWlShellSurface::shell_surface_popup_done()
QCoreApplication::postEvent(m_window->window(), new QCloseEvent());
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandwlshellsurface_p.h b/src/client/qwaylandwlshellsurface_p.h
index c9b8ac942..47d4467ce 100644
--- a/src/client/qwaylandwlshellsurface_p.h
+++ b/src/client/qwaylandwlshellsurface_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,9 +44,12 @@
QT_BEGIN_NAMESPACE
+class QWindow;
+
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandInputDevice;
-class QWindow;
class QWaylandExtendedSurface;
class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellSurface : public QWaylandShellSurface
@@ -107,4 +102,6 @@ private:
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDSHELLSURFACE_H
diff --git a/src/client/qwaylandxdgshell.cpp b/src/client/qwaylandxdgshell.cpp
index f31d63f42..65fafcead 100644
--- a/src/client/qwaylandxdgshell.cpp
+++ b/src/client/qwaylandxdgshell.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Eurogiciel, author: <philippe.coval@eurogiciel.fr>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXdgShell::QWaylandXdgShell(struct ::xdg_shell *shell)
: QtWayland::xdg_shell(shell)
{
@@ -72,5 +66,6 @@ void QWaylandXdgShell::xdg_shell_ping(uint32_t serial)
pong(serial);
}
+}
QT_END_NAMESPACE
diff --git a/src/client/qwaylandxdgshell_p.h b/src/client/qwaylandxdgshell_p.h
index 6a396bd11..954dc5707 100644
--- a/src/client/qwaylandxdgshell_p.h
+++ b/src/client/qwaylandxdgshell_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Eurogiciel, author: <philippe.coval@eurogiciel.fr>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,9 +44,12 @@
QT_BEGIN_NAMESPACE
+class QWindow;
+
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandInputDevice;
-class QWindow;
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShell : public QtWayland::xdg_shell
{
@@ -70,4 +65,6 @@ private:
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDXDGSHELL_H
diff --git a/src/client/qwaylandxdgsurface.cpp b/src/client/qwaylandxdgsurface.cpp
index 318ff86d9..f06d7e353 100644
--- a/src/client/qwaylandxdgsurface.cpp
+++ b/src/client/qwaylandxdgsurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,10 +40,11 @@
#include "qwaylandscreen_p.h"
#include "qwaylandextendedsurface_p.h"
-#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXdgSurface::QWaylandXdgSurface(struct ::xdg_surface *xdg_surface, QWaylandWindow *window)
: QtWayland::xdg_surface(xdg_surface)
, QWaylandShellSurface(window)
@@ -94,36 +87,32 @@ void QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice)
void QWaylandXdgSurface::setMaximized()
{
if (!m_maximized)
- request_change_state(XDG_SURFACE_STATE_MAXIMIZED, true, 0);
+ set_maximized();
}
void QWaylandXdgSurface::setFullscreen()
{
if (!m_fullscreen)
- request_change_state(XDG_SURFACE_STATE_FULLSCREEN, true, 0);
+ set_fullscreen(Q_NULLPTR);
}
void QWaylandXdgSurface::setNormal()
{
if (m_fullscreen || m_maximized || m_minimized) {
if (m_maximized) {
- request_change_state(XDG_SURFACE_STATE_MAXIMIZED, false, 0);
+ unset_maximized();
}
if (m_fullscreen) {
- request_change_state(XDG_SURFACE_STATE_FULLSCREEN, false, 0);
+ unset_fullscreen();
}
m_fullscreen = m_maximized = m_minimized = false;
- setTopLevel();
- QMargins m = m_window->frameMargins();
- m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom());
}
}
void QWaylandXdgSurface::setMinimized()
{
m_minimized = true;
- m_size = m_window->window()->geometry().size();
set_minimized();
}
@@ -138,22 +127,7 @@ void QWaylandXdgSurface::updateTransientParent(QWindow *parent)
if (!parent_wayland_window)
return;
- // set_transient expects a position relative to the parent
- QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
- QWindow *parentWin = m_window->window()->transientParent();
- transientPos -= parentWin->geometry().topLeft();
- if (parent_wayland_window->decoration()) {
- transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left());
- transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top());
- }
-
- uint32_t flags = 0;
- Qt::WindowFlags wf = m_window->window()->flags();
- if (wf.testFlag(Qt::ToolTip)
- || wf.testFlag(Qt::WindowTransparentForInput))
- flags |= XDG_SURFACE_SET_TRANSIENT_FOR;
-
- set_transient_for(parent_wayland_window->object());
+ set_parent(parent_wayland_window->object());
}
void QWaylandXdgSurface::setTitle(const QString & title)
@@ -196,48 +170,70 @@ void QWaylandXdgSurface::sendProperty(const QString &name, const QVariant &value
m_extendedWindow->updateGenericProperty(name, value);
}
-void QWaylandXdgSurface::xdg_surface_configure(int32_t width, int32_t height)
-{
- m_window->configure(0 , width, height);
-}
-
-void QWaylandXdgSurface::xdg_surface_change_state(uint32_t state,
- uint32_t value,
- uint32_t serial)
-{
-
- if (state == XDG_SURFACE_STATE_MAXIMIZED
- || state == XDG_SURFACE_STATE_FULLSCREEN) {
- if (value) {
- m_size = m_window->window()->geometry().size();
- } else {
- QMargins m = m_window->frameMargins();
- m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom());
+void QWaylandXdgSurface::xdg_surface_configure(int32_t width, int32_t height, struct wl_array *states,uint32_t serial)
+{
+ uint32_t *state = 0;
+ bool aboutToMaximize = false;
+ bool aboutToFullScreen = false;
+
+ state = (uint32_t*) states->data;
+
+ for (uint32_t i=0; i < states->size; i++)
+ {
+ switch (*(state+i)) {
+ case XDG_SURFACE_STATE_MAXIMIZED:
+ aboutToMaximize = true;
+ break;
+ case XDG_SURFACE_STATE_FULLSCREEN:
+ aboutToFullScreen = true;
+ break;
+ case XDG_SURFACE_STATE_RESIZING:
+ m_margins = m_window->frameMargins();
+ width -= m_margins.left() + m_margins.right();
+ height -= m_margins.top() + m_margins.bottom();
+ m_size = QSize(width,height);
+ break;
+ case XDG_SURFACE_STATE_ACTIVATED:
+ // TODO: here about the missing window activation
+ break;
+ default:
+ break;
}
}
- switch (state) {
- case XDG_SURFACE_STATE_MAXIMIZED:
- m_maximized = value;
- break;
- case XDG_SURFACE_STATE_FULLSCREEN:
- m_fullscreen = value;
- break;
+ if (!m_fullscreen && aboutToFullScreen) {
+ m_fullscreen = true;
+ m_size = m_window->window()->geometry().size();
+ m_window->window()->showFullScreen();
+ } else if (m_fullscreen && !aboutToFullScreen) {
+ m_fullscreen = false;
+ m_window->window()->showNormal();
+ } else if (!m_maximized && aboutToMaximize) {
+ m_maximized = true;
+ m_size = m_window->window()->geometry().size();
+ m_window->window()->showMaximized();
+ } else if (m_maximized && !aboutToMaximize) {
+ m_maximized = false;
+ m_window->window()->showNormal();
}
- xdg_surface_ack_change_state(object(), state, value, serial);
-}
+ if (width == 0 && height == 0) {
+ width = m_size.width();
+ height = m_size.height();
+ }
-void QWaylandXdgSurface::xdg_surface_activated()
-{
-}
+ if (width > 0 && height > 0) {
+ m_margins = m_window->frameMargins();
+ m_window->configure(0, width + m_margins.left() + m_margins.right(), height + m_margins.top() + m_margins.bottom());
+ }
-void QWaylandXdgSurface::xdg_surface_deactivated()
-{
+ xdg_surface_ack_configure(object(), serial);
}
void QWaylandXdgSurface::xdg_surface_close()
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h
index f28715707..1a53a772d 100644
--- a/src/client/qwaylandxdgsurface_p.h
+++ b/src/client/qwaylandxdgsurface_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,7 @@
#define QWAYLANDXDGSURFACE_H
#include <QtCore/QSize>
+#include <QtCore/QMargins>
#include <wayland-client.h>
@@ -52,9 +45,12 @@
QT_BEGIN_NAMESPACE
+class QWindow;
+
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandInputDevice;
-class QWindow;
class QWaylandExtendedSurface;
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurface : public QWaylandShellSurface
@@ -100,15 +96,13 @@ private:
bool m_minimized;
bool m_fullscreen;
QSize m_size;
+ QMargins m_margins;
QWaylandExtendedSurface *m_extendedWindow;
void xdg_surface_configure(int32_t width,
- int32_t height) Q_DECL_OVERRIDE;
- void xdg_surface_change_state(uint32_t state,
- uint32_t value,
- uint32_t serial) Q_DECL_OVERRIDE;
- void xdg_surface_activated() Q_DECL_OVERRIDE;
- void xdg_surface_deactivated() Q_DECL_OVERRIDE;
+ int32_t height,
+ struct wl_array *states,
+ uint32_t serial) Q_DECL_OVERRIDE;
void xdg_surface_close() Q_DECL_OVERRIDE;
friend class QWaylandWindow;
@@ -116,4 +110,6 @@ private:
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDXDGSURFACE_H
diff --git a/src/client/shellintegration/qwaylandshellintegration_p.h b/src/client/shellintegration/qwaylandshellintegration_p.h
index 45a78199c..a4b40b088 100644
--- a/src/client/shellintegration/qwaylandshellintegration_p.h
+++ b/src/client/shellintegration/qwaylandshellintegration_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandDisplay;
class QWaylandShellSurface;
@@ -61,6 +55,8 @@ public:
virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSHELLINTEGRATION_H
diff --git a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp
index f780409e1..1d901962c 100644
--- a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp
+++ b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QWaylandShellIntegrationFactoryInterface_iid, QLatin1String("/wayland-shell-integration"), Qt::CaseInsensitive))
@@ -93,4 +87,6 @@ QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString
return Q_NULLPTR;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/shellintegration/qwaylandshellintegrationfactory_p.h b/src/client/shellintegration/qwaylandshellintegrationfactory_p.h
index 415067ef8..873e57aec 100644
--- a/src/client/shellintegration/qwaylandshellintegrationfactory_p.h
+++ b/src/client/shellintegration/qwaylandshellintegrationfactory_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandShellIntegration;
class Q_WAYLAND_CLIENT_EXPORT QWaylandShellIntegrationFactory
@@ -56,6 +50,8 @@ public:
static QWaylandShellIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSHELLINTEGRATIONFACTORY_H
diff --git a/src/client/shellintegration/qwaylandshellintegrationplugin.cpp b/src/client/shellintegration/qwaylandshellintegrationplugin.cpp
index 05b5e91ad..330605672 100644
--- a/src/client/shellintegration/qwaylandshellintegrationplugin.cpp
+++ b/src/client/shellintegration/qwaylandshellintegrationplugin.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,6 +35,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandShellIntegrationPlugin::QWaylandShellIntegrationPlugin(QObject *parent)
: QObject(parent)
{
@@ -52,4 +46,6 @@ QWaylandShellIntegrationPlugin::~QWaylandShellIntegrationPlugin()
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/client/shellintegration/qwaylandshellintegrationplugin_p.h b/src/client/shellintegration/qwaylandshellintegrationplugin_p.h
index 7d01fb4e5..9bae57cc9 100644
--- a/src/client/shellintegration/qwaylandshellintegrationplugin_p.h
+++ b/src/client/shellintegration/qwaylandshellintegrationplugin_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandShellIntegration;
#define QWaylandShellIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandShellIntegrationFactoryInterface.5.3"
@@ -64,6 +58,8 @@ public:
virtual QWaylandShellIntegration *create(const QString &key, const QStringList &paramList) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSHELLINTEGRATIONPLUGIN_H
diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri
index 2ef7231bf..ac356b8fa 100644
--- a/src/compositor/compositor_api/compositor_api.pri
+++ b/src/compositor/compositor_api/compositor_api.pri
@@ -2,10 +2,12 @@ INCLUDEPATH += compositor_api
HEADERS += \
compositor_api/qwaylandcompositor.h \
+ compositor_api/qwaylandclient.h \
compositor_api/qwaylandsurface.h \
compositor_api/qwaylandsurface_p.h \
compositor_api/qwaylandinput.h \
compositor_api/qwaylandinputpanel.h \
+ compositor_api/qwaylandoutput.h \
compositor_api/qwaylanddrag.h \
compositor_api/qwaylandbufferref.h \
compositor_api/qwaylandsurfaceview.h \
@@ -14,9 +16,11 @@ HEADERS += \
SOURCES += \
compositor_api/qwaylandcompositor.cpp \
+ compositor_api/qwaylandclient.cpp \
compositor_api/qwaylandsurface.cpp \
compositor_api/qwaylandinput.cpp \
compositor_api/qwaylandinputpanel.cpp \
+ compositor_api/qwaylandoutput.cpp \
compositor_api/qwaylanddrag.cpp \
compositor_api/qwaylandbufferref.cpp \
compositor_api/qwaylandsurfaceview.cpp \
@@ -29,11 +33,13 @@ qtHaveModule(quick) {
SOURCES += \
compositor_api/qwaylandquickcompositor.cpp \
compositor_api/qwaylandquicksurface.cpp \
+ compositor_api/qwaylandquickoutput.cpp \
compositor_api/qwaylandsurfaceitem.cpp
HEADERS += \
compositor_api/qwaylandquickcompositor.h \
compositor_api/qwaylandquicksurface.h \
+ compositor_api/qwaylandquickoutput.h \
compositor_api/qwaylandsurfaceitem.h
QT += qml quick
diff --git a/src/compositor/compositor_api/qwaylandbufferref.cpp b/src/compositor/compositor_api/qwaylandbufferref.cpp
index e77b14be2..abea24afb 100644
--- a/src/compositor/compositor_api/qwaylandbufferref.cpp
+++ b/src/compositor/compositor_api/qwaylandbufferref.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -126,6 +118,11 @@ void QWaylandBufferRef::destroyTexture()
d->buffer->destroyTexture();
}
}
+
+void *QWaylandBufferRef::nativeBuffer() const
+{
+ return d->buffer->handle();
+}
#endif
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandbufferref.h b/src/compositor/compositor_api/qwaylandbufferref.h
index ded1f1d35..213474fab 100644
--- a/src/compositor/compositor_api/qwaylandbufferref.h
+++ b/src/compositor/compositor_api/qwaylandbufferref.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -77,6 +69,7 @@ public:
*/
GLuint createTexture();
void destroyTexture();
+ void *nativeBuffer() const;
#endif
private:
diff --git a/src/compositor/compositor_api/qwaylandclient.cpp b/src/compositor/compositor_api/qwaylandclient.cpp
new file mode 100644
index 000000000..216abc4f8
--- /dev/null
+++ b/src/compositor/compositor_api/qwaylandclient.cpp
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Compositor.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <private/qobject_p.h>
+
+#include "wayland_wrapper/qwlcompositor_p.h"
+#include "qwaylandcompositor.h"
+#include "qwaylandclient.h"
+
+#include <wayland-server.h>
+#include <wayland-util.h>
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandClientPrivate : public QObjectPrivate
+{
+public:
+ QWaylandClientPrivate(wl_client *_client)
+ : client(_client)
+ {
+ // Save client credentials
+ wl_client_get_credentials(client, &pid, &uid, &gid);
+ }
+
+ ~QWaylandClientPrivate()
+ {
+ }
+
+ static void client_destroy_callback(wl_listener *listener, void *data)
+ {
+ Q_UNUSED(data);
+
+ QWaylandClient *client = reinterpret_cast<Listener *>(listener)->parent;
+ Q_ASSERT(client != 0);
+ QtWayland::Compositor::instance()->m_clients.removeOne(client);
+ delete client;
+ }
+
+ wl_client *client;
+
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+
+ struct Listener {
+ wl_listener listener;
+ QWaylandClient *parent;
+ };
+ Listener listener;
+};
+
+QWaylandClient::QWaylandClient(wl_client *client)
+ : QObject(*new QWaylandClientPrivate(client))
+{
+ Q_D(QWaylandClient);
+
+ // Destroy wrapper when the client goes away
+ d->listener.parent = this;
+ d->listener.listener.notify = QWaylandClientPrivate::client_destroy_callback;
+ wl_client_add_destroy_listener(client, &d->listener.listener);
+}
+
+QWaylandClient::~QWaylandClient()
+{
+ Q_D(QWaylandClient);
+
+ // Remove listener from signal
+ wl_list_remove(&d->listener.listener.link);
+}
+
+QWaylandClient *QWaylandClient::fromWlClient(wl_client *wlClient)
+{
+ if (!wlClient)
+ return 0;
+
+ QWaylandClient *client = Q_NULLPTR;
+
+ wl_listener *l = wl_client_get_destroy_listener(wlClient,
+ QWaylandClientPrivate::client_destroy_callback);
+ if (l)
+ client = reinterpret_cast<QWaylandClientPrivate::Listener *>(
+ wl_container_of(l, (QWaylandClientPrivate::Listener *)0, listener))->parent;
+
+ if (!client) {
+ // The original idea was to create QWaylandClient instances when
+ // a client bound wl_compositor, but it's legal for a client to
+ // bind several times resulting in multiple QWaylandClient
+ // instances for the same wl_client therefore we create it from
+ // here on demand
+ client = new QWaylandClient(wlClient);
+ QtWayland::Compositor::instance()->m_clients.append(client);
+ }
+
+ return client;
+}
+
+wl_client *QWaylandClient::client() const
+{
+ Q_D(const QWaylandClient);
+
+ return d->client;
+}
+
+qint64 QWaylandClient::userId() const
+{
+ Q_D(const QWaylandClient);
+
+ return d->uid;
+}
+
+qint64 QWaylandClient::groupId() const
+{
+ Q_D(const QWaylandClient);
+
+ return d->gid;
+}
+
+qint64 QWaylandClient::processId() const
+{
+ Q_D(const QWaylandClient);
+
+ return d->pid;
+}
+
+void QWaylandClient::kill(int sig)
+{
+ Q_D(QWaylandClient);
+
+ ::kill(d->pid, sig);
+}
+
+void QWaylandClient::close()
+{
+ QtWayland::Compositor::instance()->waylandCompositor()->destroyClient(this);
+}
+
+QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandclient.h b/src/compositor/compositor_api/qwaylandclient.h
new file mode 100644
index 000000000..9199406b3
--- /dev/null
+++ b/src/compositor/compositor_api/qwaylandclient.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Compositor.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDCLIENT_H
+#define QWAYLANDCLIENT_H
+
+#include <QtCompositor/qwaylandexport.h>
+
+#include <QObject>
+
+#include <signal.h>
+
+struct wl_client;
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandClientPrivate;
+
+class Q_COMPOSITOR_EXPORT QWaylandClient : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QWaylandClient)
+
+ Q_PROPERTY(qint64 userId READ userId CONSTANT)
+ Q_PROPERTY(qint64 groupId READ groupId CONSTANT)
+ Q_PROPERTY(qint64 processId READ processId CONSTANT)
+public:
+ ~QWaylandClient();
+
+ static QWaylandClient *fromWlClient(wl_client *wlClient);
+
+ wl_client *client() const;
+
+ qint64 userId() const;
+ qint64 groupId() const;
+
+ qint64 processId() const;
+
+ Q_INVOKABLE void kill(int sig = SIGTERM);
+
+public Q_SLOTS:
+ void close();
+
+private:
+ explicit QWaylandClient(wl_client *client);
+};
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDCLIENT_H
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index a202c46b4..28e8f9d4a 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -40,7 +41,9 @@
#include "qwaylandcompositor.h"
+#include "qwaylandclient.h"
#include "qwaylandinput.h"
+#include "qwaylandoutput.h"
#include "qwaylandglobalinterface.h"
#include "qwaylandsurfaceview.h"
@@ -55,22 +58,21 @@
#include <QtCore/QStringList>
#include <QtGui/QDesktopServices>
+#include <QtGui/QScreen>
#include <QDebug>
QT_BEGIN_NAMESPACE
-QWaylandCompositor::QWaylandCompositor(QWindow *window, const char *socketName, ExtensionFlags extensions)
+QWaylandCompositor::QWaylandCompositor(const char *socketName, ExtensionFlags extensions)
: m_compositor(new QtWayland::Compositor(this, extensions))
- , m_toplevel_window(window)
{
m_compositor->m_socket_name = socketName;
m_compositor->init();
}
-QWaylandCompositor::QWaylandCompositor(QWindow *window, const char *socketName, QtWayland::Compositor *dptr)
+QWaylandCompositor::QWaylandCompositor(const char *socketName, QtWayland::Compositor *dptr)
: m_compositor(dptr)
- , m_toplevel_window(window)
{
m_compositor->m_socket_name = socketName;
m_compositor->init();
@@ -114,21 +116,19 @@ void QWaylandCompositor::destroyClientForSurface(QWaylandSurface *surface)
destroyClient(surface->client());
}
-void QWaylandCompositor::destroyClient(WaylandClient *client)
+void QWaylandCompositor::destroyClient(QWaylandClient *client)
{
m_compositor->destroyClient(client);
}
-QList<QWaylandSurface *> QWaylandCompositor::surfacesForClient(WaylandClient* c) const
+QList<QWaylandSurface *> QWaylandCompositor::surfacesForClient(QWaylandClient* client) const
{
- wl_client *client = static_cast<wl_client *>(c);
-
QList<QtWayland::Surface *> surfaces = m_compositor->surfaces();
QList<QWaylandSurface *> result;
for (int i = 0; i < surfaces.count(); ++i) {
- if (surfaces.at(i)->resource()->client() == client) {
+ if (surfaces.at(i)->waylandSurface()->client() == client) {
result.append(surfaces.at(i)->waylandSurface());
}
}
@@ -145,9 +145,24 @@ QList<QWaylandSurface *> QWaylandCompositor::surfaces() const
return surfs;
}
-QWindow * QWaylandCompositor::window() const
+QList<QWaylandOutput *> QWaylandCompositor::outputs() const
+{
+ return m_compositor->outputs();
+}
+
+QWaylandOutput *QWaylandCompositor::output(QWindow *window)
{
- return m_toplevel_window;
+ return m_compositor->output(window);
+}
+
+QWaylandOutput *QWaylandCompositor::primaryOutput() const
+{
+ return m_compositor->primaryOutput();
+}
+
+void QWaylandCompositor::setPrimaryOutput(QWaylandOutput *output)
+{
+ m_compositor->setPrimaryOutput(output);
}
void QWaylandCompositor::cleanupGraphicsResources()
@@ -162,13 +177,20 @@ void QWaylandCompositor::surfaceAboutToBeDestroyed(QWaylandSurface *surface)
QWaylandSurfaceView *QWaylandCompositor::pickView(const QPointF &globalPosition) const
{
- Q_FOREACH (QtWayland::Surface *surface, m_compositor->surfaces()) {
- foreach (QWaylandSurfaceView *view, surface->waylandSurface()->views())
- if (QRectF(view->pos(), surface->size()).contains(globalPosition))
- return view;
+ Q_FOREACH (QWaylandOutput *output, outputs()) {
+ // Skip coordinates not in output
+ if (!QRectF(output->geometry()).contains(globalPosition))
+ continue;
+
+ Q_FOREACH (QWaylandSurface *surface, output->surfaces()) {
+ Q_FOREACH (QWaylandSurfaceView *view, surface->views()) {
+ if (QRectF(view->pos(), surface->size()).contains(globalPosition))
+ return view;
+ }
+ }
}
- return 0;
+ return Q_NULLPTR;
}
QPointF QWaylandCompositor::mapToView(QWaylandSurfaceView *surface, const QPointF &globalPosition) const
@@ -181,7 +203,7 @@ QPointF QWaylandCompositor::mapToView(QWaylandSurfaceView *surface, const QPoint
The default implementation simply forwards the request to QDesktopServices::openUrl().
*/
-bool QWaylandCompositor::openUrl(WaylandClient *client, const QUrl &url)
+bool QWaylandCompositor::openUrl(QWaylandClient *client, const QUrl &url)
{
Q_UNUSED(client);
return QDesktopServices::openUrl(url);
@@ -223,33 +245,66 @@ const char *QWaylandCompositor::socketName() const
return m_compositor->m_socket_name.constData();
}
+#if QT_DEPRECATED_SINCE(5, 5)
/*!
Set the screen orientation based on accelerometer data or similar.
*/
void QWaylandCompositor::setScreenOrientation(Qt::ScreenOrientation orientation)
{
- m_compositor->setScreenOrientation(orientation);
+ QWaylandOutput *output = primaryOutput();
+ if (output) {
+ bool isPortrait = output->window()->screen()->primaryOrientation() == Qt::PortraitOrientation;
+
+ switch (orientation) {
+ case Qt::PrimaryOrientation:
+ output->setTransform(QWaylandOutput::TransformNormal);
+ break;
+ case Qt::LandscapeOrientation:
+ output->setTransform(isPortrait ? QWaylandOutput::Transform270 : QWaylandOutput::TransformNormal);
+ break;
+ case Qt::PortraitOrientation:
+ output->setTransform(isPortrait ? QWaylandOutput::TransformNormal : QWaylandOutput::Transform90);
+ break;
+ case Qt::InvertedLandscapeOrientation:
+ output->setTransform(isPortrait ? QWaylandOutput::Transform90 : QWaylandOutput::Transform180);
+ break;
+ case Qt::InvertedPortraitOrientation:
+ output->setTransform(isPortrait ? QWaylandOutput::Transform180 : QWaylandOutput::Transform270);
+ break;
+ }
+ }
}
void QWaylandCompositor::setOutputGeometry(const QRect &geometry)
{
- m_compositor->setOutputGeometry(geometry);
+ QWaylandOutput *output = primaryOutput();
+ if (output)
+ output->setGeometry(geometry);
}
QRect QWaylandCompositor::outputGeometry() const
{
- return m_compositor->outputGeometry();
+ QWaylandOutput *output = primaryOutput();
+ if (output)
+ return output->geometry();
+ return QRect();
}
void QWaylandCompositor::setOutputRefreshRate(int rate)
{
- m_compositor->setOutputRefreshRate(rate);
+ QWaylandOutput *output = primaryOutput();
+ if (output)
+ output->setMode({output->mode().size, rate});
}
int QWaylandCompositor::outputRefreshRate() const
{
- return m_compositor->outputRefreshRate();
+ QWaylandOutput *output = primaryOutput();
+ if (output)
+ return output->mode().refreshRate;
+ return 0;
}
+#endif
QWaylandInputDevice *QWaylandCompositor::defaultInputDevice() const
{
@@ -299,4 +354,16 @@ QWaylandSurfaceView *QWaylandCompositor::createView(QWaylandSurface *surface)
return new QWaylandSurfaceView(surface);
}
+QWaylandInputDevice *QWaylandCompositor::inputDeviceFor(QInputEvent *inputEvent)
+{
+ return m_compositor->inputDeviceFor(inputEvent);
+}
+
+QWaylandOutput *QWaylandCompositor::createOutput(QWindow *window,
+ const QString &manufacturer,
+ const QString &model)
+{
+ return new QWaylandOutput(this, window, manufacturer, model);
+}
+
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h
index 740f2553d..fe48db06d 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.h
+++ b/src/compositor/compositor_api/qwaylandcompositor.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -51,15 +51,19 @@ struct wl_display;
QT_BEGIN_NAMESPACE
+class QInputEvent;
+
class QMimeData;
class QUrl;
class QOpenGLContext;
+class QWaylandClient;
class QWaylandSurface;
class QWaylandInputDevice;
class QWaylandInputPanel;
class QWaylandDrag;
class QWaylandGlobalInterface;
class QWaylandSurfaceView;
+class QWaylandOutput;
namespace QtWayland
{
@@ -83,7 +87,7 @@ public:
};
Q_DECLARE_FLAGS(ExtensionFlags, ExtensionFlag)
- QWaylandCompositor(QWindow *window = 0, const char *socketName = 0, ExtensionFlags extensions = DefaultExtensions);
+ QWaylandCompositor(const char *socketName = 0, ExtensionFlags extensions = DefaultExtensions);
virtual ~QWaylandCompositor();
void addGlobalInterface(QWaylandGlobalInterface *interface);
@@ -94,12 +98,16 @@ public:
void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
void destroyClientForSurface(QWaylandSurface *surface);
- void destroyClient(WaylandClient *client);
+ void destroyClient(QWaylandClient *client);
- QList<QWaylandSurface *> surfacesForClient(WaylandClient* client) const;
+ QList<QWaylandSurface *> surfacesForClient(QWaylandClient* client) const;
QList<QWaylandSurface *> surfaces() const;
- QWindow *window()const;
+ QList<QWaylandOutput *> outputs() const;
+ QWaylandOutput *output(QWindow *window);
+
+ QWaylandOutput *primaryOutput() const;
+ void setPrimaryOutput(QWaylandOutput *output);
virtual void surfaceCreated(QWaylandSurface *surface) = 0;
virtual void surfaceAboutToBeDestroyed(QWaylandSurface *surface);
@@ -107,7 +115,7 @@ public:
virtual QWaylandSurfaceView *pickView(const QPointF &globalPosition) const;
virtual QPointF mapToView(QWaylandSurfaceView *view, const QPointF &surfacePosition) const;
- virtual bool openUrl(WaylandClient *client, const QUrl &url);
+ virtual bool openUrl(QWaylandClient *client, const QUrl &url);
QtWayland::Compositor *handle() const;
@@ -119,6 +127,7 @@ public:
const char *socketName() const;
+#if QT_DEPRECATED_SINCE(5, 5)
void setScreenOrientation(Qt::ScreenOrientation orientation);
void setOutputGeometry(const QRect &outputGeometry);
@@ -126,6 +135,7 @@ public:
void setOutputRefreshRate(int refreshRate);
int outputRefreshRate() const;
+#endif
QWaylandInputDevice *defaultInputDevice() const;
@@ -148,15 +158,18 @@ public:
virtual QWaylandSurfaceView *createView(QWaylandSurface *surface);
+ QWaylandInputDevice *inputDeviceFor(QInputEvent *inputEvent);
+
protected:
- QWaylandCompositor(QWindow *window, const char *socketName, QtWayland::Compositor *dptr);
+ QWaylandCompositor(const char *socketName, QtWayland::Compositor *dptr);
virtual void retainedSelectionReceived(QMimeData *mimeData);
+ virtual QWaylandOutput *createOutput(QWindow *window,
+ const QString &manufacturer,
+ const QString &model);
+
friend class QtWayland::Compositor;
QtWayland::Compositor *m_compositor;
-
-private:
- QWindow *m_toplevel_window;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QWaylandCompositor::ExtensionFlags)
diff --git a/src/compositor/compositor_api/qwaylanddrag.cpp b/src/compositor/compositor_api/qwaylanddrag.cpp
index 8916b0d71..b31df31b8 100644
--- a/src/compositor/compositor_api/qwaylanddrag.cpp
+++ b/src/compositor/compositor_api/qwaylanddrag.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/compositor_api/qwaylanddrag.h b/src/compositor/compositor_api/qwaylanddrag.h
index 329391bd8..c0b0aca36 100644
--- a/src/compositor/compositor_api/qwaylanddrag.h
+++ b/src/compositor/compositor_api/qwaylanddrag.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/compositor_api/qwaylandglobalinterface.cpp b/src/compositor/compositor_api/qwaylandglobalinterface.cpp
index 2de318862..791964863 100644
--- a/src/compositor/compositor_api/qwaylandglobalinterface.cpp
+++ b/src/compositor/compositor_api/qwaylandglobalinterface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/compositor_api/qwaylandglobalinterface.h b/src/compositor/compositor_api/qwaylandglobalinterface.h
index a31ae7e57..6be3236fa 100644
--- a/src/compositor/compositor_api/qwaylandglobalinterface.h
+++ b/src/compositor/compositor_api/qwaylandglobalinterface.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/compositor_api/qwaylandinput.cpp b/src/compositor/compositor_api/qwaylandinput.cpp
index 97bbb23b3..4e106f5fe 100644
--- a/src/compositor/compositor_api/qwaylandinput.cpp
+++ b/src/compositor/compositor_api/qwaylandinput.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -183,4 +183,10 @@ QWaylandInputDevice::CapabilityFlags QWaylandInputDevice::capabilities()
return d->capabilities();
}
+bool QWaylandInputDevice::isOwner(QInputEvent *inputEvent)
+{
+ Q_UNUSED(inputEvent);
+ return true;
+}
+
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandinput.h b/src/compositor/compositor_api/qwaylandinput.h
index 2c0b9ee7c..7842fa38b 100644
--- a/src/compositor/compositor_api/qwaylandinput.h
+++ b/src/compositor/compositor_api/qwaylandinput.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -54,6 +54,7 @@ class QWaylandSurface;
class QKeyEvent;
class QTouchEvent;
class QWaylandSurfaceView;
+class QInputEvent;
namespace QtWayland {
class InputDevice;
@@ -62,8 +63,8 @@ class InputDevice;
class Q_COMPOSITOR_EXPORT QWaylandKeymap
{
public:
- QWaylandKeymap(const QString &layout = QLatin1String("us"), const QString &variant = QString(), const QString &options = QString(),
- const QString &model = QLatin1String("pc105"), const QString &rules = QLatin1String("evdev"));
+ QWaylandKeymap(const QString &layout = QString(), const QString &variant = QString(), const QString &options = QString(),
+ const QString &model = QString(), const QString &rules = QString());
inline QString layout() const { return m_layout; }
inline QString variant() const { return m_variant; }
@@ -93,7 +94,7 @@ public:
Q_DECLARE_FLAGS(CapabilityFlags, CapabilityFlag)
QWaylandInputDevice(QWaylandCompositor *compositor, CapabilityFlags caps = DefaultCapabilities);
- ~QWaylandInputDevice();
+ virtual ~QWaylandInputDevice();
void sendMousePressEvent(Qt::MouseButton button, const QPointF &localPos, const QPointF &globalPos = QPointF());
void sendMouseReleaseEvent(Qt::MouseButton button, const QPointF &localPos, const QPointF &globalPos = QPointF());
@@ -125,6 +126,8 @@ public:
QWaylandInputDevice::CapabilityFlags capabilities();
+ virtual bool isOwner(QInputEvent *inputEvent);
+
private:
QtWayland::InputDevice *d;
Q_DISABLE_COPY(QWaylandInputDevice)
diff --git a/src/compositor/compositor_api/qwaylandinputpanel.cpp b/src/compositor/compositor_api/qwaylandinputpanel.cpp
index 03084262c..db4cd3296 100644
--- a/src/compositor/compositor_api/qwaylandinputpanel.cpp
+++ b/src/compositor/compositor_api/qwaylandinputpanel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/compositor_api/qwaylandinputpanel.h b/src/compositor/compositor_api/qwaylandinputpanel.h
index 735756ba1..22dc8b9f4 100644
--- a/src/compositor/compositor_api/qwaylandinputpanel.h
+++ b/src/compositor/compositor_api/qwaylandinputpanel.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/compositor_api/qwaylandoutput.cpp b/src/compositor/compositor_api/qwaylandoutput.cpp
new file mode 100644
index 000000000..ba9f39887
--- /dev/null
+++ b/src/compositor/compositor_api/qwaylandoutput.cpp
@@ -0,0 +1,257 @@
+/****************************************************************************
+**
+** Copyright (C) 2014-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Compositor.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QtMath>
+#include <QtGui/QWindow>
+#include <QtGui/QExposeEvent>
+#include <private/qobject_p.h>
+
+#include "wayland_wrapper/qwlcompositor_p.h"
+#include "wayland_wrapper/qwloutput_p.h"
+#include "qwaylandcompositor.h"
+#include "qwaylandoutput.h"
+#include "qwaylandsurface.h"
+
+QWaylandOutput::QWaylandOutput(QWaylandCompositor *compositor, QWindow *window,
+ const QString &manufacturer, const QString &model)
+ : QObject()
+ , d_ptr(new QtWayland::Output(compositor->handle(), window))
+{
+ d_ptr->m_output = this;
+ d_ptr->setManufacturer(manufacturer);
+ d_ptr->setModel(model);
+ d_ptr->compositor()->addOutput(this);
+}
+
+QWaylandOutput::~QWaylandOutput()
+{
+ d_ptr->compositor()->removeOutput(this);
+ delete d_ptr;
+}
+
+QWaylandOutput *QWaylandOutput::fromResource(wl_resource *resource)
+{
+ QtWayland::OutputResource *outputResource = static_cast<QtWayland::OutputResource *>(
+ QtWayland::Output::Resource::fromResource(resource));
+ if (!outputResource)
+ return Q_NULLPTR;
+
+ QtWayland::Output *output = static_cast<QtWayland::Output *>(outputResource->output_object);
+ if (!output)
+ return Q_NULLPTR;
+
+ return output->output();
+}
+
+void QWaylandOutput::update()
+{
+ QRect rect(QPoint(0, 0), window()->size());
+ QRegion region(rect);
+ QExposeEvent *event = new QExposeEvent(region);
+ QCoreApplication::postEvent(window(), event);
+}
+
+QWaylandCompositor *QWaylandOutput::compositor() const
+{
+ return d_ptr->compositor()->waylandCompositor();
+}
+
+QString QWaylandOutput::manufacturer() const
+{
+ return d_ptr->manufacturer();
+}
+
+QString QWaylandOutput::model() const
+{
+ return d_ptr->model();
+}
+
+QPoint QWaylandOutput::position() const
+{
+ return d_ptr->position();
+}
+
+void QWaylandOutput::setPosition(const QPoint &pt)
+{
+ if (d_ptr->position() == pt)
+ return;
+
+ d_ptr->setPosition(pt);
+ Q_EMIT positionChanged();
+ Q_EMIT geometryChanged();
+}
+
+QWaylandOutput::Mode QWaylandOutput::mode() const
+{
+ return d_ptr->mode();
+}
+
+void QWaylandOutput::setMode(const Mode &mode)
+{
+ if (d_ptr->mode().size == mode.size && d_ptr->mode().refreshRate == mode.refreshRate)
+ return;
+
+ d_ptr->setMode(mode);
+ Q_EMIT modeChanged();
+ Q_EMIT geometryChanged();
+
+ if (window()) {
+ window()->resize(mode.size);
+ window()->setMinimumSize(mode.size);
+ window()->setMaximumSize(mode.size);
+ }
+}
+
+QRect QWaylandOutput::geometry() const
+{
+ return d_ptr->geometry();
+}
+
+void QWaylandOutput::setGeometry(const QRect &geometry)
+{
+ if (d_ptr->geometry() == geometry)
+ return;
+
+ d_ptr->setGeometry(geometry);
+ Q_EMIT positionChanged();
+ Q_EMIT modeChanged();
+
+ if (window()) {
+ window()->resize(geometry.size());
+ window()->setMinimumSize(geometry.size());
+ window()->setMaximumSize(geometry.size());
+ }
+}
+
+QRect QWaylandOutput::availableGeometry() const
+{
+ if (!d_ptr->availableGeometry().isValid())
+ return QRect(d_ptr->position(), d_ptr->mode().size);
+
+ return d_ptr->availableGeometry();
+}
+
+void QWaylandOutput::setAvailableGeometry(const QRect &availableGeometry)
+{
+ if (d_ptr->availableGeometry() == availableGeometry)
+ return;
+
+ d_ptr->setAvailableGeometry(availableGeometry);
+ Q_EMIT availableGeometryChanged();
+}
+
+QSize QWaylandOutput::physicalSize() const
+{
+ return d_ptr->physicalSize();
+}
+
+void QWaylandOutput::setPhysicalSize(const QSize &size)
+{
+ if (d_ptr->physicalSize() == size)
+ return;
+
+ d_ptr->setPhysicalSize(size);
+ Q_EMIT physicalSizeChanged();
+}
+
+QWaylandOutput::Subpixel QWaylandOutput::subpixel() const
+{
+ return d_ptr->subpixel();
+}
+
+void QWaylandOutput::setSubpixel(const Subpixel &subpixel)
+{
+ if (d_ptr->subpixel() == subpixel)
+ return;
+
+ d_ptr->setSubpixel(subpixel);
+ Q_EMIT subpixelChanged();
+}
+
+QWaylandOutput::Transform QWaylandOutput::transform() const
+{
+ return d_ptr->transform();
+}
+
+void QWaylandOutput::setTransform(const Transform &transform)
+{
+ if (d_ptr->transform() == transform)
+ return;
+
+ d_ptr->setTransform(transform);
+ Q_EMIT transformChanged();
+}
+
+int QWaylandOutput::scaleFactor() const
+{
+ return d_ptr->scaleFactor();
+}
+
+void QWaylandOutput::setScaleFactor(int scale)
+{
+ if (d_ptr->scaleFactor() == scale)
+ return;
+
+ d_ptr->setScaleFactor(scale);
+ Q_EMIT scaleFactorChanged();
+
+}
+
+QWindow *QWaylandOutput::window() const
+{
+ return d_ptr->window();
+}
+
+QtWayland::Output *QWaylandOutput::handle()
+{
+ return d_ptr;
+}
+
+QList<QWaylandSurface *> QWaylandOutput::surfaces() const
+{
+ QList<QWaylandSurface *> list;
+ Q_FOREACH (QWaylandSurface *surface, d_ptr->compositor()->waylandCompositor()->surfaces()) {
+ if (surface->outputs().contains(const_cast<QWaylandOutput *>(this)))
+ list.append(surface);
+ }
+ return list;
+}
diff --git a/src/compositor/compositor_api/qwaylandoutput.h b/src/compositor/compositor_api/qwaylandoutput.h
new file mode 100644
index 000000000..9c9dc3767
--- /dev/null
+++ b/src/compositor/compositor_api/qwaylandoutput.h
@@ -0,0 +1,168 @@
+/****************************************************************************
+**
+** Copyright (C) 2014-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Compositor.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDOUTPUT_H
+#define QWAYLANDOUTPUT_H
+
+#include <QtCompositor/qwaylandexport.h>
+
+#include <QObject>
+#include <QRect>
+#include <QSize>
+
+QT_BEGIN_NAMESPACE
+
+struct wl_resource;
+
+class QWaylandCompositor;
+class QWindow;
+class QWaylandSurface;
+class QWaylandClient;
+
+namespace QtWayland {
+ class Output;
+}
+
+class Q_COMPOSITOR_EXPORT QWaylandOutput : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString manufacturer READ manufacturer CONSTANT)
+ Q_PROPERTY(QString model READ model CONSTANT)
+ Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged)
+ Q_PROPERTY(QWaylandOutput::Mode mode READ mode WRITE setMode NOTIFY modeChanged)
+ Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged)
+ Q_PROPERTY(QRect availableGeometry READ availableGeometry WRITE setAvailableGeometry NOTIFY availableGeometryChanged)
+ Q_PROPERTY(QSize physicalSize READ physicalSize WRITE setPhysicalSize NOTIFY physicalSizeChanged)
+ Q_PROPERTY(QWaylandOutput::Subpixel subpixel READ subpixel WRITE setSubpixel NOTIFY subpixelChanged)
+ Q_PROPERTY(QWaylandOutput::Transform transform READ transform WRITE setTransform NOTIFY transformChanged)
+ Q_PROPERTY(int scaleFactor READ scaleFactor WRITE setScaleFactor NOTIFY scaleFactorChanged)
+ Q_PROPERTY(QWindow *window READ window CONSTANT)
+ Q_ENUMS(Subpixel Transform)
+public:
+ enum Subpixel {
+ SubpixelUnknown = 0,
+ SubpixelNone,
+ SubpixelHorizontalRgb,
+ SubpixelHorizontalBgr,
+ SubpixelVerticalRgb,
+ SubpixelVerticalBgr
+ };
+
+ enum Transform {
+ TransformNormal = 0,
+ Transform90,
+ Transform180,
+ Transform270,
+ TransformFlipped,
+ TransformFlipped90,
+ TransformFlipped180,
+ TransformFlipped270
+ };
+
+ struct Mode
+ {
+ QSize size;
+ int refreshRate;
+ };
+
+ QWaylandOutput(QWaylandCompositor *compositor, QWindow *window,
+ const QString &manufacturer, const QString &model);
+ ~QWaylandOutput();
+
+ static QWaylandOutput *fromResource(wl_resource *resource);
+
+ virtual void update();
+
+ QWaylandCompositor *compositor() const;
+
+ QString manufacturer() const;
+
+ QString model() const;
+
+ QPoint position() const;
+ void setPosition(const QPoint &pt);
+
+ Mode mode() const;
+ void setMode(const Mode &mode);
+
+ QRect geometry() const;
+ void setGeometry(const QRect &geometry);
+
+ QRect availableGeometry() const;
+ void setAvailableGeometry(const QRect &availableGeometry);
+
+ QSize physicalSize() const;
+ void setPhysicalSize(const QSize &size);
+
+ Subpixel subpixel() const;
+ void setSubpixel(const Subpixel &subpixel);
+
+ Transform transform() const;
+ void setTransform(const Transform &transform);
+
+ int scaleFactor() const;
+ void setScaleFactor(int scale);
+
+ QWindow *window() const;
+
+ QtWayland::Output *handle();
+
+ QList<QWaylandSurface *> surfaces() const;
+
+Q_SIGNALS:
+ void positionChanged();
+ void geometryChanged();
+ void modeChanged();
+ void availableGeometryChanged();
+ void physicalSizeChanged();
+ void scaleFactorChanged();
+ void subpixelChanged();
+ void transformChanged();
+
+private:
+ QtWayland::Output *const d_ptr;
+};
+
+Q_DECLARE_METATYPE(QWaylandOutput::Mode)
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDOUTPUT_H
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp
index ae472f219..3a3c0ecea 100644
--- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandquickcompositor.cpp
@@ -1,51 +1,45 @@
/****************************************************************************
**
+** Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QQuickWindow>
-
#include <QtCompositor/private/qwlcompositor_p.h>
+#include <QtCompositor/private/qwlsurface_p.h>
+#include "qwaylandclient.h"
#include "qwaylandquickcompositor.h"
#include "qwaylandquicksurface.h"
#include "qwaylandsurfaceitem.h"
+#include "qwaylandquickoutput.h"
QT_BEGIN_NAMESPACE
@@ -54,54 +48,43 @@ class QWaylandQuickCompositorPrivate : public QtWayland::Compositor
public:
QWaylandQuickCompositorPrivate(QWaylandQuickCompositor *compositor, QWaylandCompositor::ExtensionFlags extensions)
: QtWayland::Compositor(compositor, extensions)
- , updateScheduled(false)
{
}
void compositor_create_surface(Resource *resource, uint32_t id) Q_DECL_OVERRIDE
{
QWaylandQuickSurface *surface = new QWaylandQuickSurface(resource->client(), id, wl_resource_get_version(resource->handle), static_cast<QWaylandQuickCompositor *>(m_qt_compositor));
+ surface->handle()->addToOutput(primaryOutput()->handle());
m_surfaces << surface->handle();
//BUG: This may not be an on-screen window surface though
m_qt_compositor->surfaceCreated(surface);
}
-
- void updateStarted()
- {
- updateScheduled = false;
- m_qt_compositor->frameStarted();
- m_qt_compositor->cleanupGraphicsResources();
- }
-
- bool updateScheduled;
};
-QWaylandQuickCompositor::QWaylandQuickCompositor(QQuickWindow *window, const char *socketName, ExtensionFlags extensions)
- : QWaylandCompositor(window, socketName, new QWaylandQuickCompositorPrivate(this, extensions))
+QWaylandQuickCompositor::QWaylandQuickCompositor(const char *socketName, ExtensionFlags extensions)
+ : QWaylandCompositor(socketName, new QWaylandQuickCompositorPrivate(this, extensions))
{
- window->connect(window, &QQuickWindow::beforeSynchronizing, d_ptr(), &QWaylandQuickCompositorPrivate::updateStarted, Qt::DirectConnection);
-
qmlRegisterUncreatableType<QWaylandSurfaceItem>("QtCompositor", 1, 0, "WaylandSurfaceItem", QObject::tr("Cannot create instance of WaylandSurfaceItem"));
qmlRegisterUncreatableType<QWaylandQuickSurface>("QtCompositor", 1, 0, "WaylandQuickSurface", QObject::tr("Cannot create instance of WaylandQuickSurface"));
+ qmlRegisterUncreatableType<QWaylandClient>("QtCompositor", 1, 0, "WaylandClient", QObject::tr("Cannot create instance of WaylandClient"));
+ qmlRegisterUncreatableType<QWaylandOutput>("QtCompositor", 1, 0, "WaylandOutput", QObject::tr("Cannot create instance of WaylandOutput"));
}
-QWaylandQuickCompositorPrivate *QWaylandQuickCompositor::d_ptr()
-{
- return static_cast<QWaylandQuickCompositorPrivate *>(m_compositor);
-}
-
-void QWaylandQuickCompositor::update()
+QWaylandSurfaceView *QWaylandQuickCompositor::createView(QWaylandSurface *surf)
{
- if (!d_ptr()->updateScheduled) {
- static_cast<QQuickWindow *>(window())->update();
- d_ptr()->updateScheduled = true;
- }
+ return new QWaylandSurfaceItem(static_cast<QWaylandQuickSurface *>(surf));
}
-QWaylandSurfaceView *QWaylandQuickCompositor::createView(QWaylandSurface *surf)
+QWaylandOutput *QWaylandQuickCompositor::createOutput(QWindow *window,
+ const QString &manufacturer,
+ const QString &model)
{
- return new QWaylandSurfaceItem(static_cast<QWaylandQuickSurface *>(surf));
+ QQuickWindow *quickWindow = qobject_cast<QQuickWindow *>(window);
+ if (!quickWindow)
+ qFatal("%s: couldn't cast QWindow to QQuickWindow. All output windows must "
+ "be QQuickWindow derivates when using QWaylandQuickCompositor", Q_FUNC_INFO);
+ return new QWaylandQuickOutput(this, quickWindow, manufacturer, model);
}
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.h b/src/compositor/compositor_api/qwaylandquickcompositor.h
index 0e252ba0f..e54018901 100644
--- a/src/compositor/compositor_api/qwaylandquickcompositor.h
+++ b/src/compositor/compositor_api/qwaylandquickcompositor.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,19 +41,17 @@ QT_BEGIN_NAMESPACE
class QQuickWindow;
class QWaylandQuickCompositorPrivate;
class QWaylandSurfaceView;
+class QWaylandOutput;
class Q_COMPOSITOR_EXPORT QWaylandQuickCompositor : public QWaylandCompositor
{
public:
- QWaylandQuickCompositor(QQuickWindow *window = 0, const char *socketName = 0, QWaylandCompositor::ExtensionFlags extensions = DefaultExtensions);
-
- void update();
+ QWaylandQuickCompositor(const char *socketName = 0, QWaylandCompositor::ExtensionFlags extensions = DefaultExtensions);
QWaylandSurfaceView *createView(QWaylandSurface *surf) Q_DECL_OVERRIDE;
-
-private:
- friend class QWaylandQuickCompositorPrivate;
- QWaylandQuickCompositorPrivate *d_ptr();
+ QWaylandOutput *createOutput(QWindow *window,
+ const QString &manufacturer,
+ const QString &model) Q_DECL_OVERRIDE;
};
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickoutput.cpp b/src/compositor/compositor_api/qwaylandquickoutput.cpp
new file mode 100644
index 000000000..9199ff84a
--- /dev/null
+++ b/src/compositor/compositor_api/qwaylandquickoutput.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwaylandquickoutput.h"
+#include "qwaylandquickcompositor.h"
+
+QT_BEGIN_NAMESPACE
+
+QWaylandQuickOutput::QWaylandQuickOutput(QWaylandCompositor *compositor, QQuickWindow *window,
+ const QString &manufacturer, const QString &model)
+ : QWaylandOutput(compositor, window, manufacturer, model)
+ , m_updateScheduled(false)
+{
+ connect(window, &QQuickWindow::beforeSynchronizing,
+ this, &QWaylandQuickOutput::updateStarted,
+ Qt::DirectConnection);
+}
+
+QQuickWindow *QWaylandQuickOutput::quickWindow() const
+{
+ return static_cast<QQuickWindow *>(window());
+}
+
+void QWaylandQuickOutput::update()
+{
+ if (!m_updateScheduled) {
+ quickWindow()->update();
+ m_updateScheduled = true;
+ }
+}
+
+void QWaylandQuickOutput::updateStarted()
+{
+ m_updateScheduled = false;
+ compositor()->frameStarted();
+ compositor()->cleanupGraphicsResources();
+}
+
+QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickoutput.h b/src/compositor/compositor_api/qwaylandquickoutput.h
new file mode 100644
index 000000000..702867104
--- /dev/null
+++ b/src/compositor/compositor_api/qwaylandquickoutput.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDQUICKOUTPUT_H
+#define QWAYLANDQUICKOUTPUT_H
+
+#include <QtQuick/QQuickWindow>
+#include <QtCompositor/qwaylandoutput.h>
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandQuickCompositor;
+class QQuickWindow;
+
+class Q_COMPOSITOR_EXPORT QWaylandQuickOutput : public QWaylandOutput
+{
+ Q_OBJECT
+public:
+ QWaylandQuickOutput(QWaylandCompositor *compositor, QQuickWindow *window,
+ const QString &manufacturer, const QString &model);
+
+ QQuickWindow *quickWindow() const;
+
+ void update() Q_DECL_OVERRIDE;
+
+public Q_SLOTS:
+ void updateStarted();
+
+private:
+ bool m_updateScheduled;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/compositor/compositor_api/qwaylandquicksurface.cpp b/src/compositor/compositor_api/qwaylandquicksurface.cpp
index 40cd8b749..44e0edf5d 100644
--- a/src/compositor/compositor_api/qwaylandquicksurface.cpp
+++ b/src/compositor/compositor_api/qwaylandquicksurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,7 @@
#include "qwaylandquicksurface.h"
#include "qwaylandquickcompositor.h"
#include "qwaylandsurfaceitem.h"
+#include "qwaylandoutput.h"
#include <QtCompositor/qwaylandbufferref.h>
#include <QtCompositor/private/qwaylandsurface_p.h>
@@ -84,7 +77,8 @@ public:
bufferRef.destroyTexture();
bufferRef = nextBuffer;
- QQuickWindow *window = static_cast<QQuickWindow *>(surface->compositor()->window());
+ QQuickWindow *window = static_cast<QQuickWindow *>(surface->mainOutput()->window());
+
// If the next buffer is NULL do not delete the current texture. If the client called
// attach(0) the surface is going to be unmapped anyway, if instead the client attached
// a valid buffer but died before we got here we want to keep the old buffer around
@@ -149,7 +143,8 @@ public:
}
QWaylandSurfacePrivate::surface_commit(resource);
- compositor->update();
+ Q_FOREACH (QtWayland::Output *output, outputs())
+ output->waylandOutput()->update();
}
BufferAttacher *buffer;
@@ -166,12 +161,8 @@ QWaylandQuickSurface::QWaylandQuickSurface(wl_client *client, quint32 id, int ve
d->buffer->surface = this;
setBufferAttacher(d->buffer);
- QQuickWindow *window = static_cast<QQuickWindow *>(compositor->window());
- connect(window, &QQuickWindow::beforeSynchronizing, this, &QWaylandQuickSurface::updateTexture, Qt::DirectConnection);
- connect(window, &QQuickWindow::sceneGraphInvalidated, this, &QWaylandQuickSurface::invalidateTexture, Qt::DirectConnection);
connect(this, &QWaylandSurface::windowPropertyChanged, d->windowPropertyMap, &QQmlPropertyMap::insert);
connect(d->windowPropertyMap, &QQmlPropertyMap::valueChanged, this, &QWaylandSurface::setWindowProperty);
-
}
QWaylandQuickSurface::~QWaylandQuickSurface()
@@ -207,6 +198,40 @@ QObject *QWaylandQuickSurface::windowPropertyMap() const
return d->windowPropertyMap;
}
+bool QWaylandQuickSurface::event(QEvent *e)
+{
+ if (e->type() == static_cast<QEvent::Type>(QWaylandSurfaceLeaveEvent::WaylandSurfaceLeave)) {
+ QWaylandSurfaceLeaveEvent *event = static_cast<QWaylandSurfaceLeaveEvent *>(e);
+
+ if (event->output()) {
+ QQuickWindow *oldWindow = static_cast<QQuickWindow *>(event->output()->window());
+ disconnect(oldWindow, &QQuickWindow::beforeSynchronizing,
+ this, &QWaylandQuickSurface::updateTexture);
+ disconnect(oldWindow, &QQuickWindow::sceneGraphInvalidated,
+ this, &QWaylandQuickSurface::invalidateTexture);
+ }
+
+ return true;
+ }
+
+ if (e->type() == static_cast<QEvent::Type>(QWaylandSurfaceEnterEvent::WaylandSurfaceEnter)) {
+ QWaylandSurfaceEnterEvent *event = static_cast<QWaylandSurfaceEnterEvent *>(e);
+
+ if (event->output()) {
+ QQuickWindow *window = static_cast<QQuickWindow *>(event->output()->window());
+ connect(window, &QQuickWindow::beforeSynchronizing,
+ this, &QWaylandQuickSurface::updateTexture,
+ Qt::DirectConnection);
+ connect(window, &QQuickWindow::sceneGraphInvalidated,
+ this, &QWaylandQuickSurface::invalidateTexture,
+ Qt::DirectConnection);
+ }
+
+ return true;
+ }
+
+ return QObject::event(e);
+}
void QWaylandQuickSurface::updateTexture()
{
diff --git a/src/compositor/compositor_api/qwaylandquicksurface.h b/src/compositor/compositor_api/qwaylandquicksurface.h
index d65a98273..4c37e6670 100644
--- a/src/compositor/compositor_api/qwaylandquicksurface.h
+++ b/src/compositor/compositor_api/qwaylandquicksurface.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -75,6 +67,9 @@ public:
QObject *windowPropertyMap() const;
+private:
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
+
Q_SIGNALS:
void useTextureAlphaChanged();
void clientRenderingEnabledChanged();
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index 54b38109f..e5ecb15b4 100644
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -52,6 +53,7 @@
#include "wayland_wrapper/qwldatadevicemanager_p.h"
#include "qwaylandcompositor.h"
+#include "qwaylandclient.h"
#include "qwaylandsurface_p.h"
#include "qwaylandbufferref.h"
#include "qwaylandsurfaceinterface.h"
@@ -61,14 +63,75 @@
QT_BEGIN_NAMESPACE
-QWaylandSurfacePrivate::QWaylandSurfacePrivate(wl_client *client, quint32 id, int version, QWaylandCompositor *compositor, QWaylandSurface *surface)
- : QtWayland::Surface(client, id, version, compositor, surface)
+const QEvent::Type QWaylandSurfaceEnterEvent::WaylandSurfaceEnter = (QEvent::Type)QEvent::registerEventType();
+const QEvent::Type QWaylandSurfaceLeaveEvent::WaylandSurfaceLeave = (QEvent::Type)QEvent::registerEventType();
+
+QWaylandSurfacePrivate::QWaylandSurfacePrivate(wl_client *wlClient, quint32 id, int version, QWaylandCompositor *compositor, QWaylandSurface *surface)
+ : QtWayland::Surface(wlClient, id, version, compositor, surface)
, closing(false)
, refCount(1)
+ , client(QWaylandClient::fromWlClient(wlClient))
, windowType(QWaylandSurface::WindowType::None)
{}
+class QWaylandSurfaceEnterEventPrivate
+{
+public:
+ QWaylandSurfaceEnterEventPrivate(QWaylandOutput *_output)
+ : output(_output)
+ {
+ }
+
+ QWaylandOutput *output;
+};
+
+
+QWaylandSurfaceEnterEvent::QWaylandSurfaceEnterEvent(QWaylandOutput *output)
+ : QEvent(WaylandSurfaceEnter)
+ , d(new QWaylandSurfaceEnterEventPrivate(output))
+{
+}
+
+QWaylandSurfaceEnterEvent::~QWaylandSurfaceEnterEvent()
+{
+ delete d;
+}
+
+QWaylandOutput *QWaylandSurfaceEnterEvent::output() const
+{
+ return d->output;
+}
+
+
+class QWaylandSurfaceLeaveEventPrivate
+{
+public:
+ QWaylandSurfaceLeaveEventPrivate(QWaylandOutput *_output)
+ : output(_output)
+ {
+ }
+
+ QWaylandOutput *output;
+};
+
+
+QWaylandSurfaceLeaveEvent::QWaylandSurfaceLeaveEvent(QWaylandOutput *output)
+ : QEvent(WaylandSurfaceLeave)
+ , d(new QWaylandSurfaceLeaveEventPrivate(output))
+{
+}
+
+QWaylandSurfaceLeaveEvent::~QWaylandSurfaceLeaveEvent()
+{
+ delete d;
+}
+
+QWaylandOutput *QWaylandSurfaceLeaveEvent::output() const
+{
+ return d->output;
+}
+
QWaylandSurface::QWaylandSurface(wl_client *client, quint32 id, int version, QWaylandCompositor *compositor)
: QObject(*new QWaylandSurfacePrivate(client, id, version, compositor, this))
@@ -89,12 +152,12 @@ QWaylandSurface::~QWaylandSurface()
delete d->m_attacher;
}
-WaylandClient *QWaylandSurface::client() const
+QWaylandClient *QWaylandSurface::client() const
{
Q_D(const QWaylandSurface);
- if (d->isDestroyed())
+ if (d->isDestroyed() || !d->compositor()->clients().contains(d->client))
return Q_NULLPTR;
- return d->resource()->client();
+ return d->client;
}
QWaylandSurface *QWaylandSurface::parentSurface() const
@@ -212,18 +275,6 @@ QtWayland::Surface * QWaylandSurface::handle()
return d;
}
-qint64 QWaylandSurface::processId() const
-{
- Q_D(const QWaylandSurface);
- if (d->isDestroyed())
- return -1;
-
- struct wl_client *client = static_cast<struct wl_client *>(this->client());
- pid_t pid;
- wl_client_get_credentials(client,&pid, 0,0);
- return pid;
-}
-
QVariantMap QWaylandSurface::windowProperties() const
{
Q_D(const QWaylandSurface);
@@ -248,6 +299,34 @@ QWaylandCompositor *QWaylandSurface::compositor() const
return d->compositor()->waylandCompositor();
}
+QWaylandOutput *QWaylandSurface::mainOutput() const
+{
+ Q_D(const QWaylandSurface);
+
+ // Returns the output that contains the most if not all
+ // the surface (window managers will take care of setting
+ // this, defaults to the first output)
+ return d->mainOutput()->waylandOutput();
+}
+
+void QWaylandSurface::setMainOutput(QWaylandOutput *mainOutput)
+{
+ Q_D(QWaylandSurface);
+
+ if (mainOutput)
+ d->setMainOutput(mainOutput->handle());
+}
+
+QList<QWaylandOutput *> QWaylandSurface::outputs() const
+{
+ Q_D(const QWaylandSurface);
+
+ QList<QWaylandOutput *> list;
+ Q_FOREACH (QtWayland::Output *output, d->outputs())
+ list.append(output->waylandOutput());
+ return list;
+}
+
QWindow::Visibility QWaylandSurface::visibility() const
{
Q_D(const QWaylandSurface);
@@ -321,6 +400,12 @@ bool QWaylandSurface::transientInactive() const
return d->transientInactive();
}
+bool QWaylandSurface::inputRegionContains(const QPoint &p) const
+{
+ Q_D(const QWaylandSurface);
+ return d->inputRegion().contains(p);
+}
+
void QWaylandSurface::destroy()
{
Q_D(QWaylandSurface);
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
index 7c7ec4d76..653d74c1b 100644
--- a/src/compositor/compositor_api/qwaylandsurface.h
+++ b/src/compositor/compositor_api/qwaylandsurface.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -54,12 +55,14 @@ struct wl_resource;
QT_BEGIN_NAMESPACE
class QTouchEvent;
+class QWaylandClient;
class QWaylandSurfacePrivate;
class QWaylandCompositor;
class QWaylandBufferRef;
class QWaylandSurfaceView;
class QWaylandSurfaceInterface;
class QWaylandSurfaceOp;
+class QWaylandOutput;
namespace QtWayland {
class Surface;
@@ -78,10 +81,43 @@ protected:
friend class QtWayland::Surface;
};
+class QWaylandSurfaceEnterEventPrivate;
+
+class Q_COMPOSITOR_EXPORT QWaylandSurfaceEnterEvent : public QEvent
+{
+public:
+ QWaylandSurfaceEnterEvent(QWaylandOutput *output);
+ ~QWaylandSurfaceEnterEvent();
+
+ QWaylandOutput *output() const;
+
+ static const QEvent::Type WaylandSurfaceEnter;
+
+private:
+ QWaylandSurfaceEnterEventPrivate *d;
+};
+
+class QWaylandSurfaceLeaveEventPrivate;
+
+class Q_COMPOSITOR_EXPORT QWaylandSurfaceLeaveEvent : public QEvent
+{
+public:
+ QWaylandSurfaceLeaveEvent(QWaylandOutput *output);
+ ~QWaylandSurfaceLeaveEvent();
+
+ QWaylandOutput *output() const;
+
+ static const QEvent::Type WaylandSurfaceLeave;
+
+private:
+ QWaylandSurfaceLeaveEventPrivate *d;
+};
+
class Q_COMPOSITOR_EXPORT QWaylandSurface : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandSurface)
+ Q_PROPERTY(QWaylandClient *client READ client CONSTANT)
Q_PROPERTY(QSize size READ size NOTIFY sizeChanged)
Q_PROPERTY(QWaylandSurface::WindowFlags windowFlags READ windowFlags NOTIFY windowFlagsChanged)
Q_PROPERTY(QWaylandSurface::WindowType windowType READ windowType NOTIFY windowTypeChanged)
@@ -120,7 +156,7 @@ public:
QWaylandSurface(wl_client *client, quint32 id, int version, QWaylandCompositor *compositor);
virtual ~QWaylandSurface();
- WaylandClient *client() const;
+ QWaylandClient *client() const;
QWaylandSurface *parentSurface() const;
QLinkedList<QWaylandSurface *> subSurfaces() const;
@@ -153,13 +189,17 @@ public:
QtWayland::Surface *handle();
- qint64 processId() const;
QByteArray authenticationToken() const;
QVariantMap windowProperties() const;
void setWindowProperty(const QString &name, const QVariant &value);
QWaylandCompositor *compositor() const;
+ QWaylandOutput *mainOutput() const;
+ void setMainOutput(QWaylandOutput *mainOutput);
+
+ QList<QWaylandOutput *> outputs() const;
+
QString className() const;
QString title() const;
@@ -168,6 +208,8 @@ public:
bool transientInactive() const;
+ bool inputRegionContains(const QPoint &p) const;
+
Q_INVOKABLE void destroy();
Q_INVOKABLE void destroySurface();
Q_INVOKABLE void ping();
@@ -185,7 +227,7 @@ public:
static QWaylandSurface *fromResource(::wl_resource *resource);
-public slots:
+public Q_SLOTS:
void updateSelection();
protected:
@@ -216,6 +258,7 @@ Q_SIGNALS:
friend class QWaylandSurfaceView;
friend class QWaylandSurfaceInterface;
+ friend class QtWayland::Surface;
};
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandsurface_p.h b/src/compositor/compositor_api/qwaylandsurface_p.h
index 5e2188883..4444df7a9 100644
--- a/src/compositor/compositor_api/qwaylandsurface_p.h
+++ b/src/compositor/compositor_api/qwaylandsurface_p.h
@@ -1,40 +1,33 @@
/****************************************************************************
**
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -58,13 +51,16 @@ class Q_COMPOSITOR_EXPORT QWaylandSurfacePrivate : public QObjectPrivate, public
{
Q_DECLARE_PUBLIC(QWaylandSurface)
public:
- QWaylandSurfacePrivate(wl_client *client, quint32 id, int version, QWaylandCompositor *compositor, QWaylandSurface *surface);
+ QWaylandSurfacePrivate(wl_client *wlClient, quint32 id, int version, QWaylandCompositor *compositor, QWaylandSurface *surface);
void setType(QWaylandSurface::WindowType type);
void setTitle(const QString &title);
void setClassName(const QString &className);
bool closing;
int refCount;
+
+ QWaylandClient *client;
+
QWaylandSurface::WindowType windowType;
QList<QWaylandSurfaceView *> views;
QList<QWaylandSurfaceInterface *> interfaces;
diff --git a/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp b/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp
index e60977ae9..9fc7fd6ab 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/compositor_api/qwaylandsurfaceinterface.h b/src/compositor/compositor_api/qwaylandsurfaceinterface.h
index 39902cc31..60d8ae5fa 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceinterface.h
+++ b/src/compositor/compositor_api/qwaylandsurfaceinterface.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
index 35e0cd285..90a68c4f9 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -144,7 +144,12 @@ void QWaylandSurfaceItem::mousePressEvent(QMouseEvent *event)
if (!surface())
return;
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ if (!surface()->inputRegionContains(event->pos())) {
+ event->ignore();
+ return;
+ }
+
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
if (inputDevice->mouseFocus() != this)
inputDevice->setMouseFocus(this, event->localPos(), event->windowPos());
inputDevice->sendMousePressEvent(event->button(), event->localPos(), event->windowPos());
@@ -153,7 +158,7 @@ void QWaylandSurfaceItem::mousePressEvent(QMouseEvent *event)
void QWaylandSurfaceItem::mouseMoveEvent(QMouseEvent *event)
{
if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendMouseMoveEvent(this, event->localPos(), event->windowPos());
}
}
@@ -161,7 +166,7 @@ void QWaylandSurfaceItem::mouseMoveEvent(QMouseEvent *event)
void QWaylandSurfaceItem::mouseReleaseEvent(QMouseEvent *event)
{
if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendMouseReleaseEvent(event->button(), event->localPos(), event->windowPos());
}
}
@@ -169,7 +174,11 @@ void QWaylandSurfaceItem::mouseReleaseEvent(QMouseEvent *event)
void QWaylandSurfaceItem::hoverEnterEvent(QHoverEvent *event)
{
if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ if (!surface()->inputRegionContains(event->pos())) {
+ event->ignore();
+ return;
+ }
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendMouseMoveEvent(this, event->pos());
}
}
@@ -177,15 +186,11 @@ void QWaylandSurfaceItem::hoverEnterEvent(QHoverEvent *event)
void QWaylandSurfaceItem::hoverMoveEvent(QHoverEvent *event)
{
if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
- inputDevice->sendMouseMoveEvent(this, event->pos());
- }
-}
-
-void QWaylandSurfaceItem::hoverLeaveEvent(QHoverEvent *event)
-{
- if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ if (!surface()->inputRegionContains(event->pos())) {
+ event->ignore();
+ return;
+ }
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendMouseMoveEvent(this, event->pos());
}
}
@@ -193,7 +198,12 @@ void QWaylandSurfaceItem::hoverLeaveEvent(QHoverEvent *event)
void QWaylandSurfaceItem::wheelEvent(QWheelEvent *event)
{
if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ if (!surface()->inputRegionContains(event->pos())) {
+ event->ignore();
+ return;
+ }
+
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendMouseWheelEvent(event->orientation(), event->delta());
}
}
@@ -201,7 +211,7 @@ void QWaylandSurfaceItem::wheelEvent(QWheelEvent *event)
void QWaylandSurfaceItem::keyPressEvent(QKeyEvent *event)
{
if (surface()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendFullKeyEvent(event);
}
}
@@ -209,7 +219,7 @@ void QWaylandSurfaceItem::keyPressEvent(QKeyEvent *event)
void QWaylandSurfaceItem::keyReleaseEvent(QKeyEvent *event)
{
if (surface() && hasFocus()) {
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
inputDevice->sendFullKeyEvent(event);
}
}
@@ -217,19 +227,26 @@ void QWaylandSurfaceItem::keyReleaseEvent(QKeyEvent *event)
void QWaylandSurfaceItem::touchEvent(QTouchEvent *event)
{
if (m_touchEventsEnabled) {
+ QWaylandInputDevice *inputDevice = compositor()->inputDeviceFor(event);
+
if (event->type() == QEvent::TouchBegin) {
QQuickItem *grabber = window()->mouseGrabberItem();
if (grabber != this)
grabMouse();
}
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
+ QPoint pointPos;
+ const QList<QTouchEvent::TouchPoint> &points = event->touchPoints();
+ if (!points.isEmpty())
+ pointPos = points.at(0).pos().toPoint();
+
+ if (event->type() == QEvent::TouchBegin && !surface()->inputRegionContains(pointPos)) {
+ event->ignore();
+ return;
+ }
+
event->accept();
if (inputDevice->mouseFocus() != this) {
- QPoint pointPos;
- QList<QTouchEvent::TouchPoint> points = event->touchPoints();
- if (!points.isEmpty())
- pointPos = points.at(0).pos().toPoint();
inputDevice->setMouseFocus(this, pointPos, pointPos);
}
inputDevice->sendFullTouchEvent(event);
@@ -246,15 +263,18 @@ void QWaylandSurfaceItem::mouseUngrabEvent()
}
}
-void QWaylandSurfaceItem::takeFocus()
+void QWaylandSurfaceItem::takeFocus(QWaylandInputDevice *device)
{
setFocus(true);
if (!surface())
return;
- QWaylandInputDevice *inputDevice = compositor()->defaultInputDevice();
- inputDevice->setKeyboardFocus(surface());
+ QWaylandInputDevice *target = device;
+ if (!target) {
+ target = compositor()->defaultInputDevice();
+ }
+ target->setKeyboardFocus(surface());
}
void QWaylandSurfaceItem::surfaceMapped()
@@ -352,7 +372,7 @@ QSGNode *QWaylandSurfaceItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeD
{
bool mapped = surface() && surface()->isMapped();
- if (!mapped || !m_provider->t || !m_paintEnabled) {
+ if (!mapped || !m_provider || !m_provider->t || !m_paintEnabled) {
delete oldNode;
return 0;
}
diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.h b/src/compositor/compositor_api/qwaylandsurfaceitem.h
index 2805db52a..91dc6879b 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceitem.h
+++ b/src/compositor/compositor_api/qwaylandsurfaceitem.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
class QWaylandSurfaceTextureProvider;
class QMutex;
+class QWaylandInputDevice;
class Q_COMPOSITOR_EXPORT QWaylandSurfaceItem : public QQuickItem, public QWaylandSurfaceView
{
@@ -93,7 +94,6 @@ protected:
void mouseReleaseEvent(QMouseEvent *event);
void hoverEnterEvent(QHoverEvent *event);
void hoverMoveEvent(QHoverEvent *event);
- void hoverLeaveEvent(QHoverEvent *event);
void wheelEvent(QWheelEvent *event);
void keyPressEvent(QKeyEvent *event);
@@ -102,11 +102,11 @@ protected:
void touchEvent(QTouchEvent *event);
void mouseUngrabEvent() Q_DECL_OVERRIDE;
-public slots:
- void takeFocus();
+public Q_SLOTS:
+ virtual void takeFocus(QWaylandInputDevice *device = 0);
void setPaintEnabled(bool paintEnabled);
-private slots:
+private Q_SLOTS:
void surfaceMapped();
void surfaceUnmapped();
void parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent);
diff --git a/src/compositor/compositor_api/qwaylandsurfaceview.cpp b/src/compositor/compositor_api/qwaylandsurfaceview.cpp
index 5cf331966..1d4ba304c 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceview.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfaceview.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/compositor_api/qwaylandsurfaceview.h b/src/compositor/compositor_api/qwaylandsurfaceview.h
index 6b45b6954..2da19c264 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceview.h
+++ b/src/compositor/compositor_api/qwaylandsurfaceview.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/global/qwaylandexport.h b/src/compositor/global/qwaylandexport.h
index 45ddc159d..579794afa 100644
--- a/src/compositor/global/qwaylandexport.h
+++ b/src/compositor/global/qwaylandexport.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -55,8 +55,6 @@ QT_BEGIN_NAMESPACE
# endif
#endif
-typedef void WaylandClient;
-
QT_END_NAMESPACE
#endif //WAYLANDEXPORT_H
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegration.cpp b/src/compositor/hardware_integration/qwlclientbufferintegration.cpp
index ee3bdeb84..36591a9dd 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegration.cpp
+++ b/src/compositor/hardware_integration/qwlclientbufferintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegration_p.h b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
index b660f600c..15712ea1e 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp
index 489e2594d..f56b2ec23 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h
index ccefba426..1ee972789 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp
index 1f3f2d116..db22d8085 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h
index 3ff26cd92..adb7440fc 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlhwintegration.cpp b/src/compositor/hardware_integration/qwlhwintegration.cpp
index e71bb652b..d02e72371 100644
--- a/src/compositor/hardware_integration/qwlhwintegration.cpp
+++ b/src/compositor/hardware_integration/qwlhwintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/hardware_integration/qwlhwintegration_p.h b/src/compositor/hardware_integration/qwlhwintegration_p.h
index 70128eb0e..b18b6eeb1 100644
--- a/src/compositor/hardware_integration/qwlhwintegration_p.h
+++ b/src/compositor/hardware_integration/qwlhwintegration_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegration.cpp b/src/compositor/hardware_integration/qwlserverbufferintegration.cpp
index 3c9ceb645..2d99dc850 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegration.cpp
+++ b/src/compositor/hardware_integration/qwlserverbufferintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegration_p.h b/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
index 7f08315ae..f8a15318c 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp
index be647a0e1..12a7903d6 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h
index 1fc81c950..02f15556d 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp
index def78391e..f633c1c18 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h
index cb18b34df..c074f1596 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/wayland_wrapper/qwlcompositor.cpp b/src/compositor/wayland_wrapper/qwlcompositor.cpp
index faf32dc57..2fd91f30d 100644
--- a/src/compositor/wayland_wrapper/qwlcompositor.cpp
+++ b/src/compositor/wayland_wrapper/qwlcompositor.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -44,6 +45,7 @@
#include "qwldisplay_p.h"
#include "qwloutput_p.h"
#include "qwlsurface_p.h"
+#include "qwaylandclient.h"
#include "qwaylandcompositor.h"
#include "qwldatadevicemanager_p.h"
#include "qwldatadevice_p.h"
@@ -60,6 +62,8 @@
#include "qwltextinputmanager_p.h"
#include "qwaylandglobalinterface.h"
#include "qwaylandsurfaceview.h"
+#include "qwaylandshmformathelper.h"
+#include "qwaylandoutput.h"
#include <QWindow>
#include <QSocketNotifier>
@@ -107,7 +111,6 @@ Compositor *Compositor::instance()
Compositor::Compositor(QWaylandCompositor *qt_compositor, QWaylandCompositor::ExtensionFlags extensions)
: m_extensions(extensions)
, m_display(new Display)
- , m_default_input_device(0)
, m_current_frame(0)
, m_last_queued_buf(-1)
, m_qt_compositor(qt_compositor)
@@ -144,8 +147,9 @@ void Compositor::init()
m_data_device_manager = new DataDeviceManager(this);
wl_display_init_shm(m_display->handle());
-
- m_output_global = new OutputGlobal(m_display->handle());
+ QVector<wl_shm_format> formats = QWaylandShmFormatHelper::supportedWaylandFormats();
+ foreach (wl_shm_format format, formats)
+ wl_display_add_shm_format(m_display->handle(), format);
if (wl_display_add_socket(m_display->handle(), m_qt_compositor->socketName())) {
fprintf(stderr, "Fatal: Failed to open server socket\n");
@@ -163,6 +167,7 @@ void Compositor::init()
connect(dispatcher, SIGNAL(aboutToBlock()), this, SLOT(processWaylandEvents()));
qRegisterMetaType<SurfaceBuffer*>("SurfaceBuffer*");
+ qRegisterMetaType<QWaylandClient*>("WaylandClient*");
qRegisterMetaType<QWaylandSurface*>("WaylandSurface*");
qRegisterMetaType<QWaylandSurfaceView*>("WaylandSurfaceView*");
//initialize distancefieldglyphcache here
@@ -176,6 +181,9 @@ Compositor::~Compositor()
{
if (!m_destroyed_surfaces.isEmpty())
qWarning("QWaylandCompositor::cleanupGraphicsResources() must be called manually");
+ qDeleteAll(m_clients);
+
+ qDeleteAll(m_outputs);
delete m_outputExtension;
delete m_surfaceExtension;
@@ -183,10 +191,10 @@ Compositor::~Compositor()
delete m_touchExtension;
delete m_qtkeyExtension;
+ removeInputDevice(m_default_wayland_input_device);
delete m_default_wayland_input_device;
delete m_data_device_manager;
- delete m_output_global;
delete m_display;
}
@@ -203,6 +211,57 @@ uint Compositor::currentTimeMsecs() const
return m_timer.elapsed();
}
+QList<QWaylandOutput *> Compositor::outputs() const
+{
+ return m_outputs;
+}
+
+QWaylandOutput *Compositor::output(QWindow *window) const
+{
+ Q_FOREACH (QWaylandOutput *output, m_outputs) {
+ if (output->window() == window)
+ return output;
+ }
+
+ return Q_NULLPTR;
+}
+
+void Compositor::addOutput(QWaylandOutput *output)
+{
+ Q_ASSERT(output->handle());
+
+ if (m_outputs.contains(output))
+ return;
+
+ m_outputs.append(output);
+}
+
+void Compositor::removeOutput(QWaylandOutput *output)
+{
+ Q_ASSERT(output->handle());
+
+ m_outputs.removeOne(output);
+}
+
+QWaylandOutput *Compositor::primaryOutput() const
+{
+ if (m_outputs.size() == 0)
+ return Q_NULLPTR;
+ return m_outputs.at(0);
+}
+
+void Compositor::setPrimaryOutput(QWaylandOutput *output)
+{
+ Q_ASSERT(output->handle());
+
+ int i = m_outputs.indexOf(output);
+ if (i <= 0)
+ return;
+
+ m_outputs.removeAt(i);
+ m_outputs.prepend(output);
+}
+
void Compositor::processWaylandEvents()
{
int ret = wl_event_loop_dispatch(m_loop, 0);
@@ -221,6 +280,16 @@ void Compositor::destroySurface(Surface *surface)
m_destroyed_surfaces << surface->waylandSurface();
}
+void Compositor::resetInputDevice(Surface *surface)
+{
+ foreach (QWaylandInputDevice *dev, m_inputDevices) {
+ if (dev->keyboardFocus() == surface->waylandSurface())
+ dev->setKeyboardFocus(0);
+ if (dev->mouseFocus() && dev->mouseFocus()->surface() == surface->waylandSurface())
+ dev->setMouseFocus(0, QPointF(), QPointF());
+ }
+}
+
void Compositor::cleanupGraphicsResources()
{
qDeleteAll(m_destroyed_surfaces);
@@ -231,6 +300,7 @@ void Compositor::compositor_create_surface(Resource *resource, uint32_t id)
{
QWaylandSurface *surface = new QWaylandSurface(resource->client(), id, resource->version(), m_qt_compositor);
m_surfaces << surface->handle();
+ surface->handle()->addToOutput(primaryOutput()->handle());
//BUG: This may not be an on-screen window surface though
m_qt_compositor->surfaceCreated(surface);
}
@@ -241,21 +311,15 @@ void Compositor::compositor_create_region(Resource *resource, uint32_t id)
new Region(resource->client(), id);
}
-void Compositor::destroyClient(WaylandClient *c)
+void Compositor::destroyClient(QWaylandClient *client)
{
- wl_client *client = static_cast<wl_client *>(c);
if (!client)
return;
if (m_windowManagerIntegration)
- m_windowManagerIntegration->sendQuitMessage(client);
+ m_windowManagerIntegration->sendQuitMessage(client->client());
- wl_client_destroy(client);
-}
-
-QWindow *Compositor::window() const
-{
- return m_qt_compositor->window();
+ wl_client_destroy(client->client());
}
ClientBufferIntegration * Compositor::clientBufferIntegration() const
@@ -281,11 +345,9 @@ void Compositor::initializeHardwareIntegration()
#ifdef QT_COMPOSITOR_WAYLAND_GL
if (m_extensions & QWaylandCompositor::HardwareIntegrationExtension)
m_hw_integration.reset(new HardwareIntegration(this));
- QWindow *window = m_qt_compositor->window();
- if (window && window->surfaceType() != QWindow::RasterSurface) {
- loadClientBufferIntegration();
- loadServerBufferIntegration();
- }
+
+ loadClientBufferIntegration();
+ loadServerBufferIntegration();
if (m_client_buffer_integration)
m_client_buffer_integration->initializeHardware(m_display);
@@ -319,55 +381,12 @@ void Compositor::initializeExtensions()
void Compositor::initializeDefaultInputDevice()
{
m_default_wayland_input_device = new QWaylandInputDevice(m_qt_compositor);
- m_default_input_device = m_default_wayland_input_device->handle();
+ registerInputDevice(m_default_wayland_input_device);
}
-QList<struct wl_client *> Compositor::clients() const
+QList<QWaylandClient *> Compositor::clients() const
{
- QList<struct wl_client *> list;
- foreach (Surface *surface, m_surfaces) {
- struct wl_client *client = surface->resource()->client();
- if (!list.contains(client))
- list.append(client);
- }
- return list;
-}
-
-void Compositor::setScreenOrientation(Qt::ScreenOrientation orientation)
-{
- m_orientation = orientation;
- m_output_global->sendOutputOrientation(orientation);
-}
-
-Qt::ScreenOrientation Compositor::screenOrientation() const
-{
- return m_orientation;
-}
-
-void Compositor::setOutputGeometry(const QRect &geometry)
-{
- if (m_output_global)
- m_output_global->setGeometry(geometry);
-}
-
-QRect Compositor::outputGeometry() const
-{
- if (m_output_global)
- return m_output_global->geometry();
- return QRect();
-}
-
-void Compositor::setOutputRefreshRate(int rate)
-{
- if (m_output_global)
- m_output_global->setRefreshRate(rate);
-}
-
-int Compositor::outputRefreshRate() const
-{
- if (m_output_global)
- return m_output_global->refreshRate();
- return 0;
+ return m_clients;
}
void Compositor::setClientFullScreenHint(bool value)
@@ -383,19 +402,8 @@ QWaylandCompositor::ExtensionFlags Compositor::extensions() const
InputDevice* Compositor::defaultInputDevice()
{
- return m_default_input_device;
-}
-
-QList<QtWayland::Surface *> Compositor::surfacesForClient(wl_client *client)
-{
- QList<QtWayland::Surface *> ret;
-
- for (int i=0; i < m_surfaces.count(); ++i) {
- if (m_surfaces.at(i)->resource()->client() == client) {
- ret.append(m_surfaces.at(i));
- }
- }
- return ret;
+ // The list gets prepended so that default is the last element
+ return m_inputDevices.last()->handle();
}
void Compositor::configureTouchExtension(int flags)
@@ -501,6 +509,32 @@ void Compositor::loadServerBufferIntegration()
}
}
+void Compositor::registerInputDevice(QWaylandInputDevice *device)
+{
+ // The devices get prepended as the first input device that gets added
+ // is assumed to be the default and it will claim to accept all the input
+ // events if asked
+ m_inputDevices.prepend(device);
+}
+
+void Compositor::removeInputDevice(QWaylandInputDevice *device)
+{
+ m_inputDevices.removeOne(device);
+}
+
+QWaylandInputDevice *Compositor::inputDeviceFor(QInputEvent *inputEvent)
+{
+ QWaylandInputDevice *dev = NULL;
+ for (int i = 0; i < m_inputDevices.size(); i++) {
+ QWaylandInputDevice *candidate = m_inputDevices.at(i);
+ if (candidate->isOwner(inputEvent)) {
+ dev = candidate;
+ break;
+ }
+ }
+ return dev;
+}
+
} // namespace Wayland
QT_END_NAMESPACE
diff --git a/src/compositor/wayland_wrapper/qwlcompositor_p.h b/src/compositor/wayland_wrapper/qwlcompositor_p.h
index 599f79b6d..1efbd2ee3 100644
--- a/src/compositor/wayland_wrapper/qwlcompositor_p.h
+++ b/src/compositor/wayland_wrapper/qwlcompositor_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014-2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -48,7 +49,6 @@
#include <QtCore/QElapsedTimer>
#include <QtCore/QSet>
-#include <QtGui/QWindow>
#include <private/qwldisplay_p.h>
@@ -56,6 +56,10 @@
QT_BEGIN_NAMESPACE
+class QWaylandClient;
+class QWaylandClientPrivate;
+class QInputEvent;
+
class QWaylandCompositor;
class QWaylandInputDevice;
class WindowManagerServerIntegration;
@@ -91,17 +95,28 @@ public:
void init();
void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
- void frameFinished(Surface *surface = 0);
- InputDevice *defaultInputDevice(); //we just have 1 default device for now (since QPA doesn't give us anything else)
+ InputDevice *defaultInputDevice();
+
+ void registerInputDevice(QWaylandInputDevice *device);
+ QList<QWaylandInputDevice *> inputDevices() const { return m_inputDevices; }
+ QWaylandInputDevice *inputDeviceFor(QInputEvent *inputEvent);
+ void removeInputDevice(QWaylandInputDevice *device);
void destroySurface(Surface *surface);
- void destroyClient(WaylandClient *client);
+ void destroyClient(QWaylandClient *client);
uint currentTimeMsecs() const;
- QWindow *window() const;
+ QList<QWaylandOutput *> outputs() const;
+ QWaylandOutput *output(QWindow *window) const;
+
+ void addOutput(QWaylandOutput *output);
+ void removeOutput(QWaylandOutput *output);
+
+ QWaylandOutput *primaryOutput() const;
+ void setPrimaryOutput(QWaylandOutput *output);
ClientBufferIntegration *clientBufferIntegration() const;
ServerBufferIntegration *serverBufferIntegration() const;
@@ -110,8 +125,8 @@ public:
void initializeDefaultInputDevice();
void initializeWindowManagerProtocol();
- QList<Surface*> surfaces() const { return m_surfaces; }
- QList<Surface*> surfacesForClient(wl_client* client);
+ QList<Surface *> surfaces() const { return m_surfaces; }
+
QWaylandCompositor *waylandCompositor() const { return m_qt_compositor; }
struct wl_display *wl_display() const { return m_display->handle(); }
@@ -119,17 +134,10 @@ public:
static Compositor *instance();
- QList<struct wl_client *> clients() const;
+ QList<QWaylandClient *> clients() const;
WindowManagerServerIntegration *windowManagerIntegration() const { return m_windowManagerIntegration; }
- void setScreenOrientation(Qt::ScreenOrientation orientation);
- Qt::ScreenOrientation screenOrientation() const;
- void setOutputGeometry(const QRect &geometry);
- QRect outputGeometry() const;
- void setOutputRefreshRate(int rate);
- int outputRefreshRate() const;
-
void setClientFullScreenHint(bool value);
QWaylandCompositor::ExtensionFlags extensions() const;
@@ -153,6 +161,8 @@ public:
void feedRetainedSelectionData(QMimeData *data);
static void bindGlobal(wl_client *client, void *data, uint32_t version, uint32_t id);
+ void resetInputDevice(Surface *surface);
+
public slots:
void cleanupGraphicsResources();
@@ -173,11 +183,11 @@ protected:
/* Input */
QWaylandInputDevice *m_default_wayland_input_device;
- InputDevice *m_default_input_device;
+
+ QList<QWaylandInputDevice *> m_inputDevices;
/* Output */
- //make this a list of the available screens
- OutputGlobal *m_output_global;
+ QList<QWaylandOutput *> m_outputs;
DataDeviceManager *m_data_device_manager;
@@ -193,6 +203,7 @@ protected:
QWaylandCompositor *m_qt_compositor;
Qt::ScreenOrientation m_orientation;
+ QList<QWaylandClient *> m_clients;
#ifdef QT_COMPOSITOR_WAYLAND_GL
QScopedPointer<HardwareIntegration> m_hw_integration;
@@ -218,6 +229,8 @@ protected:
bool m_retainSelection;
friend class QT_PREPEND_NAMESPACE(QWaylandCompositor);
+ friend class QT_PREPEND_NAMESPACE(QWaylandClient);
+ friend class QT_PREPEND_NAMESPACE(QWaylandClientPrivate);
};
}
diff --git a/src/compositor/wayland_wrapper/qwldatadevice.cpp b/src/compositor/wayland_wrapper/qwldatadevice.cpp
index 9003e03e2..d97592bd7 100644
--- a/src/compositor/wayland_wrapper/qwldatadevice.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldatadevice_p.h b/src/compositor/wayland_wrapper/qwldatadevice_p.h
index 520d231f4..6be177dec 100644
--- a/src/compositor/wayland_wrapper/qwldatadevice_p.h
+++ b/src/compositor/wayland_wrapper/qwldatadevice_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
index ab4c3fec0..2fe7ff4d7 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h b/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h
index e21a95676..988066fc5 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldataoffer.cpp b/src/compositor/wayland_wrapper/qwldataoffer.cpp
index 02da4ec92..028e0bf86 100644
--- a/src/compositor/wayland_wrapper/qwldataoffer.cpp
+++ b/src/compositor/wayland_wrapper/qwldataoffer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldataoffer_p.h b/src/compositor/wayland_wrapper/qwldataoffer_p.h
index 643322f32..8d4cd1256 100644
--- a/src/compositor/wayland_wrapper/qwldataoffer_p.h
+++ b/src/compositor/wayland_wrapper/qwldataoffer_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldatasource.cpp b/src/compositor/wayland_wrapper/qwldatasource.cpp
index 21e622703..0350ff649 100644
--- a/src/compositor/wayland_wrapper/qwldatasource.cpp
+++ b/src/compositor/wayland_wrapper/qwldatasource.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldatasource_p.h b/src/compositor/wayland_wrapper/qwldatasource_p.h
index 013f4b54f..1ddad3634 100644
--- a/src/compositor/wayland_wrapper/qwldatasource_p.h
+++ b/src/compositor/wayland_wrapper/qwldatasource_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldisplay.cpp b/src/compositor/wayland_wrapper/qwldisplay.cpp
index affb0d17a..fafde3f73 100644
--- a/src/compositor/wayland_wrapper/qwldisplay.cpp
+++ b/src/compositor/wayland_wrapper/qwldisplay.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwldisplay_p.h b/src/compositor/wayland_wrapper/qwldisplay_p.h
index f18cb1e6b..6ba66f951 100644
--- a/src/compositor/wayland_wrapper/qwldisplay_p.h
+++ b/src/compositor/wayland_wrapper/qwldisplay_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlextendedoutput.cpp b/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
index 8bf69ff41..dbcbb57b8 100644
--- a/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
+++ b/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -56,10 +56,10 @@ OutputExtensionGlobal::OutputExtensionGlobal(Compositor *compositor)
void OutputExtensionGlobal::output_extension_get_extended_output(qt_output_extension::Resource *resource, uint32_t id, wl_resource *output_resource)
{
- Output *output = static_cast<Output *>(OutputGlobal::Resource::fromResource(output_resource));
+ OutputResource *output = static_cast<OutputResource *>(Output::Resource::fromResource(output_resource));
Q_ASSERT(output->extendedOutput == 0);
- ExtendedOutput *extendedOutput = static_cast<ExtendedOutput *>(qt_extended_output::add(resource->client(), id, resource->version()));
+ ExtendedOutput *extendedOutput = static_cast<ExtendedOutput *>(qt_extended_output::add(resource->client(), id));
Q_ASSERT(!output->extendedOutput);
output->extendedOutput = extendedOutput;
diff --git a/src/compositor/wayland_wrapper/qwlextendedoutput_p.h b/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
index 5f620cd86..8d030dd95 100644
--- a/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
+++ b/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -54,14 +54,14 @@ QT_BEGIN_NAMESPACE
namespace QtWayland {
class Compositor;
-class Output;
+class OutputResource;
class ExtendedOutput : public QtWaylandServer::qt_extended_output::Resource
{
public:
ExtendedOutput() : output(0) {}
- Output *output;
+ OutputResource *output;
};
class OutputExtensionGlobal : public QtWaylandServer::qt_output_extension, public QtWaylandServer::qt_extended_output
diff --git a/src/compositor/wayland_wrapper/qwlextendedsurface.cpp b/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
index e4ba40e70..1c6a14172 100644
--- a/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlextendedsurface_p.h b/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
index 9bcb28272..e3c370091 100644
--- a/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputdevice.cpp b/src/compositor/wayland_wrapper/qwlinputdevice.cpp
index 40f21134e..cb27ab4e4 100644
--- a/src/compositor/wayland_wrapper/qwlinputdevice.cpp
+++ b/src/compositor/wayland_wrapper/qwlinputdevice.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
namespace QtWayland {
InputDevice::InputDevice(QWaylandInputDevice *handle, Compositor *compositor, QWaylandInputDevice::CapabilityFlags caps)
- : QtWaylandServer::wl_seat(compositor->wl_display(), 2)
+ : QtWaylandServer::wl_seat(compositor->wl_display(), 3)
, m_handle(handle)
, m_dragHandle(new QWaylandDrag(this))
, m_compositor(compositor)
diff --git a/src/compositor/wayland_wrapper/qwlinputdevice_p.h b/src/compositor/wayland_wrapper/qwlinputdevice_p.h
index 35a2224b9..785c6d7e9 100644
--- a/src/compositor/wayland_wrapper/qwlinputdevice_p.h
+++ b/src/compositor/wayland_wrapper/qwlinputdevice_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputmethod.cpp b/src/compositor/wayland_wrapper/qwlinputmethod.cpp
index ea495b37c..5bafe7894 100644
--- a/src/compositor/wayland_wrapper/qwlinputmethod.cpp
+++ b/src/compositor/wayland_wrapper/qwlinputmethod.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputmethod_p.h b/src/compositor/wayland_wrapper/qwlinputmethod_p.h
index 2cfa14b99..f2df5c8ab 100644
--- a/src/compositor/wayland_wrapper/qwlinputmethod_p.h
+++ b/src/compositor/wayland_wrapper/qwlinputmethod_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputmethodcontext.cpp b/src/compositor/wayland_wrapper/qwlinputmethodcontext.cpp
index 5b9a24db1..caf75b2ae 100644
--- a/src/compositor/wayland_wrapper/qwlinputmethodcontext.cpp
+++ b/src/compositor/wayland_wrapper/qwlinputmethodcontext.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputmethodcontext_p.h b/src/compositor/wayland_wrapper/qwlinputmethodcontext_p.h
index 5060d4d6f..a766d63d6 100644
--- a/src/compositor/wayland_wrapper/qwlinputmethodcontext_p.h
+++ b/src/compositor/wayland_wrapper/qwlinputmethodcontext_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputpanel.cpp b/src/compositor/wayland_wrapper/qwlinputpanel.cpp
index 4dae2749c..2f11a9b3f 100644
--- a/src/compositor/wayland_wrapper/qwlinputpanel.cpp
+++ b/src/compositor/wayland_wrapper/qwlinputpanel.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputpanel_p.h b/src/compositor/wayland_wrapper/qwlinputpanel_p.h
index 75d795e4c..a475da37c 100644
--- a/src/compositor/wayland_wrapper/qwlinputpanel_p.h
+++ b/src/compositor/wayland_wrapper/qwlinputpanel_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlinputpanelsurface.cpp b/src/compositor/wayland_wrapper/qwlinputpanelsurface.cpp
index 138e57032..fdaf895ef 100644
--- a/src/compositor/wayland_wrapper/qwlinputpanelsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlinputpanelsurface.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -77,10 +78,11 @@ void InputPanelSurface::input_panel_surface_set_overlay_panel(Resource *)
m_type = OverlayPanel;
}
-void InputPanelSurface::input_panel_surface_set_toplevel(Resource *, wl_resource *output, uint32_t position)
+void InputPanelSurface::input_panel_surface_set_toplevel(Resource *, wl_resource *output_resource, uint32_t position)
{
m_type = Toplevel;
- m_output = static_cast<Output *>(Output::Resource::fromResource(output));
+ OutputResource *output = static_cast<OutputResource *>(Output::Resource::fromResource(output_resource));
+ m_output = static_cast<Output *>(output->output_object);
m_position = static_cast<wl_input_panel_surface::position>(position);
}
diff --git a/src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h b/src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h
index 89c85895f..621ce135c 100644
--- a/src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -68,7 +69,7 @@ public:
protected:
void input_panel_surface_set_overlay_panel(Resource *resource) Q_DECL_OVERRIDE;
- void input_panel_surface_set_toplevel(Resource *resource, wl_resource *output, uint32_t position) Q_DECL_OVERRIDE;
+ void input_panel_surface_set_toplevel(Resource *resource, wl_resource *output_resource, uint32_t position) Q_DECL_OVERRIDE;
private:
Surface *m_surface;
diff --git a/src/compositor/wayland_wrapper/qwlkeyboard.cpp b/src/compositor/wayland_wrapper/qwlkeyboard.cpp
index 748639c8d..a7889fd40 100644
--- a/src/compositor/wayland_wrapper/qwlkeyboard.cpp
+++ b/src/compositor/wayland_wrapper/qwlkeyboard.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -203,6 +203,11 @@ void Keyboard::keyboard_destroy_resource(wl_keyboard::Resource *resource)
m_focusResource = 0;
}
+void Keyboard::keyboard_release(wl_keyboard::Resource *resource)
+{
+ wl_resource_destroy(resource->handle);
+}
+
void Keyboard::key(uint32_t serial, uint32_t time, uint32_t key, uint32_t state)
{
if (m_focusResource) {
diff --git a/src/compositor/wayland_wrapper/qwlkeyboard_p.h b/src/compositor/wayland_wrapper/qwlkeyboard_p.h
index fff6e3e04..44503114e 100644
--- a/src/compositor/wayland_wrapper/qwlkeyboard_p.h
+++ b/src/compositor/wayland_wrapper/qwlkeyboard_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidi ary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -110,6 +110,7 @@ Q_SIGNALS:
protected:
void keyboard_bind_resource(Resource *resource);
void keyboard_destroy_resource(Resource *resource);
+ void keyboard_release(Resource *resource) Q_DECL_OVERRIDE;
private:
void sendKeyEvent(uint code, uint32_t state);
diff --git a/src/compositor/wayland_wrapper/qwllistener.cpp b/src/compositor/wayland_wrapper/qwllistener.cpp
index a754981bf..5a3c0e576 100644
--- a/src/compositor/wayland_wrapper/qwllistener.cpp
+++ b/src/compositor/wayland_wrapper/qwllistener.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/wayland_wrapper/qwllistener_p.h b/src/compositor/wayland_wrapper/qwllistener_p.h
index 4c49b1433..addc9a1fb 100644
--- a/src/compositor/wayland_wrapper/qwllistener_p.h
+++ b/src/compositor/wayland_wrapper/qwllistener_p.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/compositor/wayland_wrapper/qwloutput.cpp b/src/compositor/wayland_wrapper/qwloutput.cpp
index 7638370bc..ba9338d34 100644
--- a/src/compositor/wayland_wrapper/qwloutput.cpp
+++ b/src/compositor/wayland_wrapper/qwloutput.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -39,100 +40,231 @@
****************************************************************************/
#include "qwloutput_p.h"
+
+#include "qwlcompositor_p.h"
#include "qwlextendedoutput_p.h"
-#include <QGuiApplication>
-#include <QtGui/QScreen>
+#include "qwlsurface_p.h"
+
+#include <QtGui/QWindow>
#include <QRect>
+#include <QtCompositor/QWaylandSurface>
+#include <QtCompositor/QWaylandOutput>
QT_BEGIN_NAMESPACE
namespace QtWayland {
-OutputGlobal::OutputGlobal(struct ::wl_display *display)
- : QtWaylandServer::wl_output(display, 2)
- , m_displayId(-1)
- , m_numQueued(0)
- , m_transform(WL_OUTPUT_TRANSFORM_NORMAL)
+static QtWaylandServer::wl_output::subpixel toWlSubpixel(const QWaylandOutput::Subpixel &value)
{
- QScreen *screen = QGuiApplication::primaryScreen();
- m_geometry = QRect(QPoint(0, 0), screen->availableGeometry().size());
- m_refreshRate = qRound(screen->refreshRate() * 1000.0);
+ switch (value) {
+ case QWaylandOutput::SubpixelUnknown:
+ return QtWaylandServer::wl_output::subpixel_unknown;
+ case QWaylandOutput::SubpixelNone:
+ return QtWaylandServer::wl_output::subpixel_none;
+ case QWaylandOutput::SubpixelHorizontalRgb:
+ return QtWaylandServer::wl_output::subpixel_horizontal_rgb;
+ case QWaylandOutput::SubpixelHorizontalBgr:
+ return QtWaylandServer::wl_output::subpixel_horizontal_bgr;
+ case QWaylandOutput::SubpixelVerticalRgb:
+ return QtWaylandServer::wl_output::subpixel_vertical_rgb;
+ case QWaylandOutput::SubpixelVerticalBgr:
+ return QtWaylandServer::wl_output::subpixel_vertical_bgr;
+ default:
+ break;
+ }
+
+ return QtWaylandServer::wl_output::subpixel_unknown;
}
-OutputGlobal::~OutputGlobal()
+static QtWaylandServer::wl_output::transform toWlTransform(const QWaylandOutput::Transform &value)
{
+ switch (value) {
+ case QWaylandOutput::Transform90:
+ return QtWaylandServer::wl_output::transform_90;
+ case QWaylandOutput::Transform180:
+ return QtWaylandServer::wl_output::transform_180;
+ case QWaylandOutput::Transform270:
+ return QtWaylandServer::wl_output::transform_270;
+ case QWaylandOutput::TransformFlipped:
+ return QtWaylandServer::wl_output::transform_flipped;
+ case QWaylandOutput::TransformFlipped90:
+ return QtWaylandServer::wl_output::transform_flipped_90;
+ case QWaylandOutput::TransformFlipped180:
+ return QtWaylandServer::wl_output::transform_flipped_180;
+ case QWaylandOutput::TransformFlipped270:
+ return QtWaylandServer::wl_output::transform_flipped_270;
+ default:
+ break;
+ }
+
+ return QtWaylandServer::wl_output::transform_normal;
}
-void OutputGlobal::output_bind_resource(Resource *resource)
+Output::Output(Compositor *compositor, QWindow *window)
+ : QtWaylandServer::wl_output(compositor->wl_display(), 2)
+ , m_compositor(compositor)
+ , m_window(window)
+ , m_output(Q_NULLPTR)
+ , m_position(QPoint())
+ , m_availableGeometry(QRect())
+ , m_physicalSize(QSize())
+ , m_subpixel(QWaylandOutput::SubpixelUnknown)
+ , m_transform(QWaylandOutput::TransformNormal)
+ , m_scaleFactor(1)
{
- wl_output_send_geometry(resource->handle, 0, 0,
- m_physicalSize.width(), m_physicalSize.height(), 0, "", "", m_transform);
-
- wl_output_send_mode(resource->handle, WL_OUTPUT_MODE_CURRENT|WL_OUTPUT_MODE_PREFERRED,
- size().width(), size().height(), refreshRate());
+ m_mode.size = window ? window->size() : QSize();
+ m_mode.refreshRate = 60;
- if (resource->version() >= 2)
- wl_output_send_done(resource->handle);
+ qRegisterMetaType<QWaylandOutput::Mode>("WaylandOutput::Mode");
}
-void OutputGlobal::setPhysicalSize(const QSize &size)
+void Output::output_bind_resource(Resource *resource)
{
- if (m_physicalSize != size) {
- m_physicalSize = size;
+ send_geometry(resource->handle,
+ m_position.x(), m_position.y(),
+ m_physicalSize.width(), m_physicalSize.height(),
+ toWlSubpixel(m_subpixel), m_manufacturer, m_model,
+ toWlTransform(m_transform));
- foreach (Resource *res, resourceMap()) {
- wl_output_send_geometry(res->handle, 0, 0,
- m_physicalSize.width(), m_physicalSize.height(), 0, "", "", m_transform);
+ send_mode(resource->handle, mode_current | mode_preferred,
+ m_mode.size.width(), m_mode.size.height(),
+ m_mode.refreshRate);
- if (res->version() >= 2)
- wl_output_send_done(res->handle);
- }
+ if (resource->version() >= 2) {
+ send_scale(resource->handle, m_scaleFactor);
+ send_done(resource->handle);
}
}
-void OutputGlobal::setGeometry(const QRect &geometry)
+void Output::setManufacturer(const QString &manufacturer)
+{
+ m_manufacturer = manufacturer;
+}
+
+void Output::setModel(const QString &model)
{
- m_geometry = geometry;
+ m_model = model;
}
-void OutputGlobal::setRefreshRate(int rate)
+void Output::setPosition(const QPoint &position)
{
- m_refreshRate = rate;
+ if (m_position == position)
+ return;
+
+ m_position = position;
+
+ sendGeometryInfo();
}
-void OutputGlobal::sendOutputOrientation(Qt::ScreenOrientation orientation)
+void Output::setMode(const QWaylandOutput::Mode &mode)
{
- QScreen *screen = QGuiApplication::primaryScreen();
- bool isPortrait = screen->primaryOrientation() == Qt::PortraitOrientation;
- switch (orientation) {
- case Qt::PrimaryOrientation:
- m_transform = WL_OUTPUT_TRANSFORM_NORMAL;
- break;
- case Qt::PortraitOrientation:
- m_transform = isPortrait ? WL_OUTPUT_TRANSFORM_NORMAL : WL_OUTPUT_TRANSFORM_90;
- break;
- case Qt::LandscapeOrientation:
- m_transform = isPortrait ? WL_OUTPUT_TRANSFORM_270 : WL_OUTPUT_TRANSFORM_NORMAL;
- break;
- case Qt::InvertedPortraitOrientation:
- m_transform = isPortrait ? WL_OUTPUT_TRANSFORM_180 : WL_OUTPUT_TRANSFORM_270;
- break;
- case Qt::InvertedLandscapeOrientation:
- m_transform = isPortrait ? WL_OUTPUT_TRANSFORM_90 : WL_OUTPUT_TRANSFORM_180;
- break;
+ if (m_mode.size == mode.size && m_mode.refreshRate == mode.refreshRate)
+ return;
+
+ m_mode = mode;
+
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
+ send_mode(resource->handle, mode_current,
+ m_mode.size.width(), m_mode.size.height(),
+ m_mode.refreshRate * 1000);
+ if (resource->version() >= 2)
+ send_done(resource->handle);
}
+}
- foreach (Resource *res, resourceMap()) {
- wl_output_send_geometry(res->handle, 0, 0,
- m_physicalSize.width(), m_physicalSize.height(), 0, "", "", m_transform);
- if (res->version() >= 2)
- wl_output_send_done(res->handle);
+QRect Output::geometry() const
+{
+ return QRect(m_position, m_mode.size);
+}
+
+void Output::setGeometry(const QRect &geometry)
+{
+ if (m_position == geometry.topLeft() && m_mode.size == geometry.size())
+ return;
+
+ m_position = geometry.topLeft();
+ m_mode.size = geometry.size();
+
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
+ send_geometry(resource->handle,
+ m_position.x(), m_position.y(),
+ m_physicalSize.width(), m_physicalSize.height(),
+ toWlSubpixel(m_subpixel), m_manufacturer, m_model,
+ toWlTransform(m_transform));
+ send_mode(resource->handle, mode_current,
+ m_mode.size.width(), m_mode.size.height(),
+ m_mode.refreshRate * 1000);
+ if (resource->version() >= 2)
+ send_done(resource->handle);
}
}
-Output *OutputGlobal::outputForClient(wl_client *client) const
+void Output::setAvailableGeometry(const QRect &availableGeometry)
+{
+ m_availableGeometry = availableGeometry;
+}
+
+void Output::setPhysicalSize(const QSize &physicalSize)
{
- return static_cast<Output *>(resourceMap().value(client));
+ if (m_physicalSize == physicalSize)
+ return;
+
+ m_physicalSize = physicalSize;
+
+ sendGeometryInfo();
+}
+
+void Output::setSubpixel(const QWaylandOutput::Subpixel &subpixel)
+{
+ if (m_subpixel == subpixel)
+ return;
+
+ m_subpixel = subpixel;
+
+ sendGeometryInfo();
+}
+
+void Output::setTransform(const QWaylandOutput::Transform &transform)
+{
+ if (m_transform == transform)
+ return;
+
+ m_transform = transform;
+
+ sendGeometryInfo();
+}
+
+void Output::setScaleFactor(int scale)
+{
+ if (m_scaleFactor == scale)
+ return;
+
+ m_scaleFactor = scale;
+
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
+ if (resource->version() >= 2) {
+ send_scale(resource->handle, m_scaleFactor);
+ send_done(resource->handle);
+ }
+ }
+}
+
+OutputResource *Output::outputForClient(wl_client *client) const
+{
+ return static_cast<OutputResource *>(resourceMap().value(client));
+}
+
+void Output::sendGeometryInfo()
+{
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
+ send_geometry(resource->handle,
+ m_position.x(), m_position.x(),
+ m_physicalSize.width(), m_physicalSize.height(),
+ toWlSubpixel(m_subpixel), m_manufacturer, m_model,
+ toWlTransform(m_transform));
+ if (resource->version() >= 2)
+ send_done(resource->handle);
+ }
}
} // namespace Wayland
diff --git a/src/compositor/wayland_wrapper/qwloutput_p.h b/src/compositor/wayland_wrapper/qwloutput_p.h
index 9d90550e3..1bf6e01f6 100644
--- a/src/compositor/wayland_wrapper/qwloutput_p.h
+++ b/src/compositor/wayland_wrapper/qwloutput_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -41,74 +42,96 @@
#ifndef WL_OUTPUT_H
#define WL_OUTPUT_H
+#include <QtCompositor/qwaylandexport.h>
+
#include <QtCore/QRect>
#include <QtCore/QList>
#include <QtCompositor/private/qwayland-server-wayland.h>
+#include <QtCompositor/qwaylandoutput.h>
QT_BEGIN_NAMESPACE
+class QWindow;
+
namespace QtWayland {
+class Compositor;
class ExtendedOutput;
-struct Output : public QtWaylandServer::wl_output::Resource
+struct OutputResource : public QtWaylandServer::wl_output::Resource
{
- Output() : extendedOutput(0) {}
+ OutputResource() : extendedOutput(0) {}
ExtendedOutput *extendedOutput;
};
-class OutputGlobal : public QtWaylandServer::wl_output
+class Output : public QtWaylandServer::wl_output
{
public:
- OutputGlobal(struct ::wl_display *display);
- ~OutputGlobal();
+ explicit Output(Compositor *compositor, QWindow *window = 0);
+
+ Compositor *compositor() const { return m_compositor; }
+
+ QWaylandOutput *output() const { return m_output; }
+
+ QString manufacturer() const { return m_manufacturer; }
+ void setManufacturer(const QString &manufacturer);
+ QString model() const { return m_model; }
+ void setModel(const QString &model);
+
+ QPoint position() const { return m_position; }
+ void setPosition(const QPoint &position);
+
+ QRect geometry() const;
void setGeometry(const QRect &geometry);
- QRect geometry() const { return m_geometry; }
- int x() const { return m_geometry.x(); }
- int y() const { return m_geometry.y(); }
- QSize size() const { return m_geometry.size(); }
+ QWaylandOutput::Mode mode() const { return m_mode; }
+ void setMode(const QWaylandOutput::Mode &mode);
- void setPhysicalSize(const QSize &size);
- void setRefreshRate(int rate);
- int refreshRate() const { return m_refreshRate; }
- void sendOutputOrientation(Qt::ScreenOrientation orientation);
+ QRect availableGeometry() const { return m_availableGeometry; }
+ void setAvailableGeometry(const QRect &availableGeometry);
- Output *outputForClient(struct wl_client *client) const;
+ QSize physicalSize() const { return m_physicalSize; }
+ void setPhysicalSize(const QSize &physicalSize);
- void output_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- Resource *output_allocate() Q_DECL_OVERRIDE { return new Output; }
+ QWaylandOutput::Subpixel subpixel() const { return m_subpixel; }
+ void setSubpixel(const QWaylandOutput::Subpixel &subpixel);
-private:
- QRect m_geometry;
- QSize m_physicalSize;
- int m_refreshRate;
- int m_displayId;
- int m_numQueued;
- wl_output_transform m_transform;
-};
+ QWaylandOutput::Transform transform() const { return m_transform; }
+ void setTransform(const QWaylandOutput::Transform &transform);
-#if 0
-class Output
-{
-public:
- Output(OutputGlobal *outputGlobal, struct ::wl_resource *resource);
- ~Output();
+ int scaleFactor() const { return m_scaleFactor; }
+ void setScaleFactor(int scale);
+
+ QWindow *window() const { return m_window; }
- OutputGlobal *outputGlobal() const;
+ OutputResource *outputForClient(struct wl_client *client) const;
- ExtendedOutput *extendedOutput() const;
- void setExtendedOutput(ExtendedOutput *extendedOutput);
+ QWaylandOutput *waylandOutput() const { return m_output; }
+
+ void output_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
+ Resource *output_allocate() Q_DECL_OVERRIDE { return new OutputResource; }
- struct wl_resource *handle() const;
private:
- struct wl_resource *m_output_resource;
- OutputGlobal *m_output_global;
- ExtendedOutput *m_extended_output;
+ friend class QT_PREPEND_NAMESPACE(QWaylandOutput);
+
+ Compositor *m_compositor;
+ QWindow *m_window;
+ QWaylandOutput *m_output;
+ QString m_manufacturer;
+ QString m_model;
+ QPoint m_position;
+ QWaylandOutput::Mode m_mode;
+ QRect m_availableGeometry;
+ QSize m_physicalSize;
+ QWaylandOutput::Subpixel m_subpixel;
+ QWaylandOutput::Transform m_transform;
+ int m_scaleFactor;
+ QList<QWaylandSurface *> m_surfaces;
+
+ void sendGeometryInfo();
};
-#endif
}
diff --git a/src/compositor/wayland_wrapper/qwlpointer.cpp b/src/compositor/wayland_wrapper/qwlpointer.cpp
index 4363ed0f4..10c2d1037 100644
--- a/src/compositor/wayland_wrapper/qwlpointer.cpp
+++ b/src/compositor/wayland_wrapper/qwlpointer.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -217,6 +217,11 @@ void Pointer::pointer_destroy_resource(wl_pointer::Resource *resource)
m_focusResource = 0;
}
+void Pointer::pointer_release(wl_pointer::Resource *resource)
+{
+ wl_resource_destroy(resource->handle);
+}
+
void Pointer::setMouseFocus(QWaylandSurfaceView *surface, const QPointF &localPos, const QPointF &globalPos)
{
m_position = globalPos;
diff --git a/src/compositor/wayland_wrapper/qwlpointer_p.h b/src/compositor/wayland_wrapper/qwlpointer_p.h
index f24b7c038..db2932d04 100644
--- a/src/compositor/wayland_wrapper/qwlpointer_p.h
+++ b/src/compositor/wayland_wrapper/qwlpointer_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -114,6 +114,7 @@ public:
protected:
void pointer_set_cursor(Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) Q_DECL_OVERRIDE;
+ void pointer_release(Resource *resource) Q_DECL_OVERRIDE;
void pointer_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
private:
diff --git a/src/compositor/wayland_wrapper/qwlqtkey.cpp b/src/compositor/wayland_wrapper/qwlqtkey.cpp
index 285709064..1eb6c2f1b 100644
--- a/src/compositor/wayland_wrapper/qwlqtkey.cpp
+++ b/src/compositor/wayland_wrapper/qwlqtkey.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlqtkey_p.h b/src/compositor/wayland_wrapper/qwlqtkey_p.h
index 6257e0a92..2b10c8f71 100644
--- a/src/compositor/wayland_wrapper/qwlqtkey_p.h
+++ b/src/compositor/wayland_wrapper/qwlqtkey_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlqttouch.cpp b/src/compositor/wayland_wrapper/qwlqttouch.cpp
index 0110c433b..9d4dfdcdd 100644
--- a/src/compositor/wayland_wrapper/qwlqttouch.cpp
+++ b/src/compositor/wayland_wrapper/qwlqttouch.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlqttouch_p.h b/src/compositor/wayland_wrapper/qwlqttouch_p.h
index 720bc83e5..e5215def6 100644
--- a/src/compositor/wayland_wrapper/qwlqttouch_p.h
+++ b/src/compositor/wayland_wrapper/qwlqttouch_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlregion.cpp b/src/compositor/wayland_wrapper/qwlregion.cpp
index f9bcde380..03829df9a 100644
--- a/src/compositor/wayland_wrapper/qwlregion.cpp
+++ b/src/compositor/wayland_wrapper/qwlregion.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlregion_p.h b/src/compositor/wayland_wrapper/qwlregion_p.h
index 06d21ff37..7fc92f071 100644
--- a/src/compositor/wayland_wrapper/qwlregion_p.h
+++ b/src/compositor/wayland_wrapper/qwlregion_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface.cpp b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
index 856dd2f32..beb11d095 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -42,11 +43,13 @@
#include "qwlcompositor_p.h"
#include "qwlsurface_p.h"
+#include "qwloutput_p.h"
#include "qwlinputdevice_p.h"
#include "qwlsubsurface_p.h"
#include "qwlpointer_p.h"
#include "qwlextendedsurface_p.h"
+#include "qwaylandoutput.h"
#include "qwaylandsurfaceview.h"
#include <QtCore/qglobal.h>
@@ -279,14 +282,33 @@ void ShellSurface::shell_surface_set_transient(Resource *resource,
void ShellSurface::shell_surface_set_fullscreen(Resource *resource,
uint32_t method,
uint32_t framerate,
- struct wl_resource *output)
+ struct wl_resource *output_resource)
{
Q_UNUSED(resource);
Q_UNUSED(method);
Q_UNUSED(framerate);
- Q_UNUSED(output);
- QSize defaultScreenSize = m_surface->compositor()->outputGeometry().size();
- send_configure(resize_bottom_right, defaultScreenSize.width(), defaultScreenSize.height());
+
+ QWaylandOutput *output = output_resource
+ ? QWaylandOutput::fromResource(output_resource)
+ : Q_NULLPTR;
+ if (!output) {
+ // Look for an output that can contain this surface
+ Q_FOREACH (QWaylandOutput *curOutput, m_surface->compositor()->outputs()) {
+ if (curOutput->geometry().size().width() >= m_surface->size().width() &&
+ curOutput->geometry().size().height() >= m_surface->size().height()) {
+ output = curOutput;
+ break;
+ }
+ }
+ }
+ if (!output) {
+ qWarning() << "Unable to resize surface full screen, cannot determine output";
+ return;
+ }
+ QSize outputSize = output->geometry().size();
+
+ m_view->setPos(output->geometry().topLeft());
+ send_configure(resize_bottom_right, outputSize.width(), outputSize.height());
if (m_surface->extendedSurface())
m_surface->extendedSurface()->setVisibility(QWindow::FullScreen, false);
@@ -312,12 +334,31 @@ void ShellSurface::shell_surface_set_popup(Resource *resource, wl_resource *inpu
}
void ShellSurface::shell_surface_set_maximized(Resource *resource,
- struct wl_resource *output)
+ struct wl_resource *output_resource)
{
Q_UNUSED(resource);
- Q_UNUSED(output);
- QSize defaultScreenSize = m_surface->compositor()->outputGeometry().size();
- send_configure(resize_bottom_right, defaultScreenSize.width(), defaultScreenSize.height());
+
+ QWaylandOutput *output = output_resource
+ ? QWaylandOutput::fromResource(output_resource)
+ : Q_NULLPTR;
+ if (!output) {
+ // Look for an output that can contain this surface
+ Q_FOREACH (QWaylandOutput *curOutput, m_surface->compositor()->outputs()) {
+ if (curOutput->geometry().size().width() >= m_surface->size().width() &&
+ curOutput->geometry().size().height() >= m_surface->size().height()) {
+ output = curOutput;
+ break;
+ }
+ }
+ }
+ if (!output) {
+ qWarning() << "Unable to maximize surface, cannot determine output";
+ return;
+ }
+ QSize outputSize = output->availableGeometry().size();
+
+ m_view->setPos(output->availableGeometry().topLeft());
+ send_configure(resize_bottom_right, outputSize.width(), outputSize.height());
if (m_surface->extendedSurface())
m_surface->extendedSurface()->setVisibility(QWindow::Maximized, false);
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface_p.h b/src/compositor/wayland_wrapper/qwlshellsurface_p.h
index 92405bbc9..672606229 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlshellsurface_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -139,7 +139,7 @@ private:
void shell_surface_set_fullscreen(Resource *resource,
uint32_t method,
uint32_t framerate,
- struct wl_resource *output) Q_DECL_OVERRIDE;
+ struct wl_resource *output_resource) Q_DECL_OVERRIDE;
void shell_surface_set_popup(Resource *resource,
struct wl_resource *input_device,
uint32_t time,
@@ -148,7 +148,7 @@ private:
int32_t y,
uint32_t flags) Q_DECL_OVERRIDE;
void shell_surface_set_maximized(Resource *resource,
- struct wl_resource *output) Q_DECL_OVERRIDE;
+ struct wl_resource *output_resource) Q_DECL_OVERRIDE;
void shell_surface_pong(Resource *resource,
uint32_t serial) Q_DECL_OVERRIDE;
void shell_surface_set_title(Resource *resource,
diff --git a/src/compositor/wayland_wrapper/qwlsubsurface.cpp b/src/compositor/wayland_wrapper/qwlsubsurface.cpp
index 3c866a1d2..afc6d1825 100644
--- a/src/compositor/wayland_wrapper/qwlsubsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsubsurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlsubsurface_p.h b/src/compositor/wayland_wrapper/qwlsubsurface_p.h
index 938c2be33..0357b1e0e 100644
--- a/src/compositor/wayland_wrapper/qwlsubsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlsubsurface_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp
index 5cd8bb506..4cadbb590 100644
--- a/src/compositor/wayland_wrapper/qwlsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -48,6 +48,7 @@
#include "qwlsubsurface_p.h"
#include "qwlsurfacebuffer_p.h"
#include "qwaylandsurfaceview.h"
+#include "qwaylandoutput.h"
#include <QtCore/QDebug>
#include <QTouchEvent>
@@ -104,16 +105,23 @@ public:
bool canSend;
};
+static QRegion infiniteRegion() {
+ return QRegion(QRect(QPoint(std::numeric_limits<int>::min(), std::numeric_limits<int>::min()),
+ QPoint(std::numeric_limits<int>::max(), std::numeric_limits<int>::max())));
+}
+
Surface::Surface(struct wl_client *client, uint32_t id, int version, QWaylandCompositor *compositor, QWaylandSurface *surface)
: QtWaylandServer::wl_surface(client, id, version)
, m_compositor(compositor->handle())
, m_waylandSurface(surface)
+ , m_mainOutput(0)
, m_buffer(0)
, m_surfaceMapped(false)
, m_attacher(0)
, m_extendedSurface(0)
, m_subSurface(0)
, m_inputPanelSurface(0)
+ , m_inputRegion(infiniteRegion())
, m_transientParent(0)
, m_transientInactive(false)
, m_transientOffset(QPointF(0, 0))
@@ -124,6 +132,7 @@ Surface::Surface(struct wl_client *client, uint32_t id, int version, QWaylandCom
{
m_pending.buffer = 0;
m_pending.newlyAttached = false;
+ m_pending.inputRegion = infiniteRegion();
}
Surface::~Surface()
@@ -190,7 +199,6 @@ void Surface::setSize(const QSize &size)
{
if (size != m_size) {
m_opaqueRegion = QRegion();
- m_inputRegion = QRegion(QRect(QPoint(), size));
m_size = size;
m_waylandSurface->sizeChanged();
}
@@ -270,6 +278,68 @@ Compositor *Surface::compositor() const
return m_compositor;
}
+Output *Surface::mainOutput() const
+{
+ if (!m_mainOutput)
+ return m_compositor->primaryOutput()->handle();
+ return m_mainOutput;
+}
+
+void Surface::setMainOutput(Output *output)
+{
+ m_mainOutput = output;
+}
+
+QList<Output *> Surface::outputs() const
+{
+ return m_outputs;
+}
+
+void Surface::addToOutput(Output *output)
+{
+ if (!output)
+ return;
+
+ if (!m_mainOutput)
+ m_mainOutput = output;
+
+ if (m_outputs.contains(output))
+ return;
+
+ m_outputs.append(output);
+
+ QWaylandSurfaceEnterEvent event(output->waylandOutput());
+ QCoreApplication::sendEvent(waylandSurface(), &event);
+
+ // Send surface enter event
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
+ QList<Output::Resource *> outputs = output->resourceMap().values();
+ for (int i = 0; i < outputs.size(); i++)
+ send_enter(resource->handle, outputs.at(i)->handle);
+ }
+}
+
+void Surface::removeFromOutput(Output *output)
+{
+ if (!output)
+ return;
+
+ m_outputs.removeOne(output);
+
+ if (m_outputs.size() == 0)
+ m_mainOutput = m_compositor->primaryOutput()->handle();
+
+ QWaylandSurfaceLeaveEvent event(output->waylandOutput());
+ QCoreApplication::sendEvent(waylandSurface(), &event);
+
+ // Send surface leave event
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
+ QList<Output::Resource *> outputs = output->resourceMap().values();
+ for (int i = 0; i < outputs.size(); i++)
+ send_leave(resource->handle, outputs.at(i)->handle);
+ }
+}
+
/*!
* Sets the backbuffer for this surface. The back buffer is not yet on
* screen and will become live during the next swapBuffers().
@@ -288,11 +358,7 @@ void Surface::setBackBuffer(SurfaceBuffer *buffer)
m_damage = m_damage.intersected(QRect(QPoint(), m_size));
emit m_waylandSurface->damaged(m_damage);
} else {
- InputDevice *inputDevice = m_compositor->defaultInputDevice();
- if (inputDevice->keyboardFocus() == this)
- inputDevice->setKeyboardFocus(0);
- if (inputDevice->mouseFocus() && inputDevice->mouseFocus()->surface() == waylandSurface())
- inputDevice->setMouseFocus(0, QPointF(), QPointF());
+ m_compositor->resetInputDevice(this);
}
m_damage = QRegion();
}
@@ -379,7 +445,11 @@ void Surface::surface_set_opaque_region(Resource *, struct wl_resource *region)
void Surface::surface_set_input_region(Resource *, struct wl_resource *region)
{
- m_inputRegion = region ? Region::fromResource(region)->region() : QRegion(QRect(QPoint(), size()));
+ if (region) {
+ m_pending.inputRegion = Region::fromResource(region)->region();
+ } else {
+ m_pending.inputRegion = infiniteRegion();
+ }
}
void Surface::surface_commit(Resource *)
@@ -406,6 +476,8 @@ void Surface::surface_commit(Resource *)
m_frameCallbacks << m_pendingFrameCallbacks;
m_pendingFrameCallbacks.clear();
+ m_inputRegion = m_pending.inputRegion.intersected(QRect(QPoint(), m_size));
+
emit m_waylandSurface->redraw();
}
diff --git a/src/compositor/wayland_wrapper/qwlsurface_p.h b/src/compositor/wayland_wrapper/qwlsurface_p.h
index 5a3c4be3d..103b5994a 100644
--- a/src/compositor/wayland_wrapper/qwlsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlsurface_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -44,6 +44,7 @@
#include <QtCompositor/qwaylandexport.h>
#include <private/qwlsurfacebuffer_p.h>
+#include <private/qwloutput_p.h>
#include <QtCompositor/qwaylandsurface.h>
#include <QtCompositor/qwaylandbufferref.h>
@@ -112,6 +113,14 @@ public:
Compositor *compositor() const;
+ Output *mainOutput() const;
+ void setMainOutput(Output *output);
+
+ QList<Output *> outputs() const;
+
+ void addToOutput(Output *output);
+ void removeFromOutput(Output *output);
+
QString className() const { return m_className; }
void setClassName(const QString &className);
@@ -159,6 +168,8 @@ protected:
Compositor *m_compositor;
QWaylandSurface *m_waylandSurface;
+ Output *m_mainOutput;
+ QList<Output *> m_outputs;
QRegion m_damage;
SurfaceBuffer *m_buffer;
@@ -171,6 +182,7 @@ protected:
QRegion damage;
QPoint offset;
bool newlyAttached;
+ QRegion inputRegion;
} m_pending;
QPoint m_lastLocalMousePos;
diff --git a/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp b/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
index 1ed1fefd8..066ffd15b 100644
--- a/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -50,6 +50,9 @@
#include <QtCore/QDebug>
+#include <wayland-server-protocol.h>
+#include "qwaylandshmformathelper.h"
+
QT_BEGIN_NAMESPACE
namespace QtWayland {
@@ -235,7 +238,8 @@ QImage SurfaceBuffer::image()
int stride = wl_shm_buffer_get_stride(m_shmBuffer);
int width = wl_shm_buffer_get_width(m_shmBuffer);
int height = wl_shm_buffer_get_height(m_shmBuffer);
- m_image = QImage(data, width, height, stride, QImage::Format_ARGB32_Premultiplied);
+ QImage::Format format = QWaylandShmFormatHelper::fromWaylandShmFormat(wl_shm_format(wl_shm_buffer_get_format(m_shmBuffer)));
+ m_image = QImage(data, width, height, stride, format);
}
return m_image;
diff --git a/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h b/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h
index 19f45953d..8e07068bc 100644
--- a/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h
+++ b/src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwltextinput.cpp b/src/compositor/wayland_wrapper/qwltextinput.cpp
index 9aba674f4..992ca0dc5 100644
--- a/src/compositor/wayland_wrapper/qwltextinput.cpp
+++ b/src/compositor/wayland_wrapper/qwltextinput.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwltextinput_p.h b/src/compositor/wayland_wrapper/qwltextinput_p.h
index 7bfe6b88c..2618e296a 100644
--- a/src/compositor/wayland_wrapper/qwltextinput_p.h
+++ b/src/compositor/wayland_wrapper/qwltextinput_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwltextinputmanager.cpp b/src/compositor/wayland_wrapper/qwltextinputmanager.cpp
index 92062944b..ce16f01c9 100644
--- a/src/compositor/wayland_wrapper/qwltextinputmanager.cpp
+++ b/src/compositor/wayland_wrapper/qwltextinputmanager.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwltextinputmanager_p.h b/src/compositor/wayland_wrapper/qwltextinputmanager_p.h
index 2d9be14da..049929c0c 100644
--- a/src/compositor/wayland_wrapper/qwltextinputmanager_p.h
+++ b/src/compositor/wayland_wrapper/qwltextinputmanager_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/compositor/wayland_wrapper/qwltouch.cpp b/src/compositor/wayland_wrapper/qwltouch.cpp
index 85f065b59..d15988940 100644
--- a/src/compositor/wayland_wrapper/qwltouch.cpp
+++ b/src/compositor/wayland_wrapper/qwltouch.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -90,6 +90,17 @@ void Touch::focusDestroyed(void *data)
m_focusResource = 0;
}
+void Touch::touch_destroy_resource(Resource *resource)
+{
+ if (m_focusResource == resource)
+ m_focusResource = 0;
+}
+
+void Touch::touch_release(Resource *resource)
+{
+ wl_resource_destroy(resource->handle);
+}
+
void Touch::sendCancel()
{
if (m_focusResource)
diff --git a/src/compositor/wayland_wrapper/qwltouch_p.h b/src/compositor/wayland_wrapper/qwltouch_p.h
index a6404c36e..403cc3b4e 100644
--- a/src/compositor/wayland_wrapper/qwltouch_p.h
+++ b/src/compositor/wayland_wrapper/qwltouch_p.h
@@ -1,8 +1,8 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -101,6 +101,8 @@ public:
private:
void focusDestroyed(void *data);
+ void touch_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void touch_release(Resource *resource) Q_DECL_OVERRIDE;
Compositor *m_compositor;
diff --git a/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
index 5387854a4..25e0419e9 100644
--- a/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
+++ b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -43,6 +43,7 @@
#include <wayland_wrapper/qwldisplay_p.h>
#include <wayland_wrapper/qwlcompositor_p.h>
+#include <compositor_api/qwaylandclient.h>
#include <compositor_api/qwaylandcompositor.h>
#include <wayland-server.h>
@@ -104,7 +105,7 @@ void WindowManagerServerIntegration::windowmanager_open_url(Resource *resource,
m_urls.insert(resource, url);
else {
m_urls.remove(resource);
- m_compositor->openUrl(resource->client(), QUrl(url));
+ m_compositor->openUrl(QWaylandClient::fromWlClient(resource->client()), QUrl(url));
}
}
diff --git a/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h
index 4b2a753ee..2575a3d6b 100644
--- a/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h
+++ b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/extensions/brcm.xml b/src/extensions/brcm.xml
index 4c8e188da..9ac678f97 100644
--- a/src/extensions/brcm.xml
+++ b/src/extensions/brcm.xml
@@ -3,8 +3,8 @@
<!-- eglCreateGlobalImageBRCM support. This object is created by
the server and published using the display's global event. -->
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -20,8 +20,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/drm-egl-server-buffer.xml b/src/extensions/drm-egl-server-buffer.xml
index 597552ee4..375b0044a 100644
--- a/src/extensions/drm-egl-server-buffer.xml
+++ b/src/extensions/drm-egl-server-buffer.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="drm_egl_server_buffer">
<copyright>
- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/hardware-integration.xml b/src/extensions/hardware-integration.xml
index ad505c9d7..d2040b3bf 100644
--- a/src/extensions/hardware-integration.xml
+++ b/src/extensions/hardware-integration.xml
@@ -1,8 +1,8 @@
<protocol name="hardware_integration">
<copyright>
- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/libhybris-egl-server-buffer.xml b/src/extensions/libhybris-egl-server-buffer.xml
index 597ca0d78..0d3a4cee7 100644
--- a/src/extensions/libhybris-egl-server-buffer.xml
+++ b/src/extensions/libhybris-egl-server-buffer.xml
@@ -2,7 +2,7 @@
<protocol name="libhybris_egl_server_buffer">
<copyright>
Copyright (C) 2014 Jolla Ltd
- Contact: http://www.qt-project.org/legal
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/output-extension.xml b/src/extensions/output-extension.xml
index 0a7f11a90..b1a2f4db7 100644
--- a/src/extensions/output-extension.xml
+++ b/src/extensions/output-extension.xml
@@ -1,8 +1,8 @@
<protocol name="output_extension">
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/qtkey-extension.xml b/src/extensions/qtkey-extension.xml
index 711a2c284..34cf24797 100644
--- a/src/extensions/qtkey-extension.xml
+++ b/src/extensions/qtkey-extension.xml
@@ -1,8 +1,8 @@
<protocol name="qtkey_extension">
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/server-buffer-extension.xml b/src/extensions/server-buffer-extension.xml
index 370a80137..732e7b7e7 100644
--- a/src/extensions/server-buffer-extension.xml
+++ b/src/extensions/server-buffer-extension.xml
@@ -1,8 +1,8 @@
<protocol name="server_buffer_extension">
<copyright>
- Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/sub-surface-extension.xml b/src/extensions/sub-surface-extension.xml
index 0a6dcfbc7..4ea87e203 100644
--- a/src/extensions/sub-surface-extension.xml
+++ b/src/extensions/sub-surface-extension.xml
@@ -1,8 +1,8 @@
<protocol name="sub_surface_extension">
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/surface-extension.xml b/src/extensions/surface-extension.xml
index 680a6acca..1abba7d43 100644
--- a/src/extensions/surface-extension.xml
+++ b/src/extensions/surface-extension.xml
@@ -1,8 +1,8 @@
<protocol name="surface_extension">
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/touch-extension.xml b/src/extensions/touch-extension.xml
index 92aefc670..300caf26d 100644
--- a/src/extensions/touch-extension.xml
+++ b/src/extensions/touch-extension.xml
@@ -1,8 +1,8 @@
<protocol name="touch_extension">
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/windowmanager.xml b/src/extensions/windowmanager.xml
index e03bc3ad3..3d3bbd7fe 100644
--- a/src/extensions/windowmanager.xml
+++ b/src/extensions/windowmanager.xml
@@ -1,8 +1,8 @@
<protocol name="windowmanager">
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -18,8 +18,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/extensions/xcomposite.xml b/src/extensions/xcomposite.xml
index e7eb2b85a..44ecdd27c 100644
--- a/src/extensions/xcomposite.xml
+++ b/src/extensions/xcomposite.xml
@@ -3,8 +3,8 @@
<!-- XComposite support. This object is created by the server and published
using the display's global event. -->
<copyright>
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
- Contact: http://www.qt-project.org/legal
+ Copyright (C) 2015 The Qt Company Ltd.
+ Contact: http://www.qt.io/licensing/
This file is part of the plugins of the Qt Toolkit.
@@ -20,8 +20,8 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
- * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- of its contributors may be used to endorse or promote products derived
+ * Neither the name of The Qt Company Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
index f1e14c10c..c9ebb96b4 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandBrcmEglIntegration::QWaylandBrcmEglIntegration()
: m_waylandDisplay(0)
{
@@ -125,4 +119,6 @@ EGLDisplay QWaylandBrcmEglIntegration::eglDisplay() const
return m_eglDisplay;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
index cfc545d97..7fe557fbb 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,12 +45,15 @@
#include <QtCore/qglobal.h>
+struct qt_brcm;
+
QT_BEGIN_NAMESPACE
-class QWaylandWindow;
class QWindow;
-struct qt_brcm;
+namespace QtWaylandClient {
+
+class QWaylandWindow;
class QWaylandBrcmEglIntegration : public QWaylandClientBufferIntegration
{
@@ -91,6 +86,8 @@ private:
EGLDisplay m_eglDisplay;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDBRCMEGLINTEGRATION_H
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
index 3ca72a772..d87644096 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -58,6 +50,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandBrcmBuffer : public QWaylandBuffer
{
public:
@@ -264,4 +258,6 @@ bool QWaylandBrcmEglWindow::makeCurrent(EGLContext context)
return eglMakeCurrent(m_eglIntegration->eglDisplay(), m_eglSurfaces[m_current], m_eglSurfaces[m_current], context);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
index bc8f12d1f..1e00c0a82 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,6 +43,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandGLContext;
class QWaylandBrcmBuffer;
@@ -93,6 +87,8 @@ private:
QMutex m_mutex;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDBRCMEGLWINDOW_H
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
index 85b7b49f0..9189217e2 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
extern QSurfaceFormat brcmFixFormat(const QSurfaceFormat &format);
QWaylandBrcmGLContext::QWaylandBrcmGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
@@ -102,4 +96,6 @@ EGLConfig QWaylandBrcmGLContext::eglConfig() const
return m_config;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
index a66c0a601..fe86e50f2 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandWindow;
class QWaylandGLWindowSurface;
@@ -78,6 +72,8 @@ private:
QSurfaceFormat m_format;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDBRCMGLCONTEXT_H
diff --git a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
index ac9691147..d3fb3f2fa 100644
--- a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
DrmServerBuffer::DrmServerBuffer(DrmEglServerBufferIntegration *integration
, int32_t name
, int32_t width
@@ -165,4 +159,6 @@ void DrmEglServerBufferIntegration::drm_egl_server_buffer_server_buffer_created(
qt_server_buffer_set_user_data(id, server_buffer);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
index f74b8aca5..4f8fa765a 100644
--- a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -64,6 +56,8 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target,
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class DrmEglServerBufferIntegration;
class DrmServerBuffer : public QWaylandServerBuffer
@@ -126,6 +120,9 @@ void DrmEglServerBufferIntegration::glEGLImageTargetTexture2DOES (GLenum target,
}
m_gl_egl_image_target_texture(target,image);
}
+
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
index a723ae591..cdb7ec3ef 100644
--- a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
LibHybrisServerBuffer::LibHybrisServerBuffer(LibHybrisEglServerBufferIntegration *integration
, int32_t numFds
, wl_array *ints
@@ -178,4 +172,6 @@ void LibHybrisEglServerBufferIntegration::libhybris_egl_server_buffer_server_buf
qt_server_buffer_set_user_data(qid, server_buffer);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
index dd334bd2f..299bcf74e 100644
--- a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
+++ b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -68,6 +60,8 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLHYBRISCREATEREMOTEBUFFERPROC)(EGLint widt
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class LibHybrisEglServerBufferIntegration;
class LibHybrisServerBuffer : public QWaylandServerBuffer, public QtWayland::qt_libhybris_buffer
@@ -153,6 +147,9 @@ EGLBoolean LibHybrisEglServerBufferIntegration::eglHybrisCreateRemoteBuffer(EGLi
}
return m_egl_create_buffer(width, height, usage, format, stride, num_ints, ints, num_fds, fds, buffer);
}
+
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
index 99a32018f..8f3ce0936 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,8 +42,9 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
static const char *qwaylandegl_threadedgl_blacklist_vendor[] = {
- "Mesa Project",
0
};
@@ -129,9 +122,38 @@ QPlatformOpenGLContext *QWaylandEglClientBufferIntegration::createPlatformOpenGL
return new QWaylandGLContext(m_eglDisplay, m_display, glFormat, share);
}
+void *QWaylandEglClientBufferIntegration::nativeResource(NativeResource resource)
+{
+ switch (resource) {
+ case EglDisplay:
+ return m_eglDisplay;
+ default:
+ break;
+ }
+ return Q_NULLPTR;
+}
+
+void *QWaylandEglClientBufferIntegration::nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context)
+{
+ Q_ASSERT(context);
+ switch (resource) {
+ case EglConfig:
+ return static_cast<QWaylandGLContext *>(context)->eglConfig();
+ case EglContext:
+ return static_cast<QWaylandGLContext *>(context)->eglContext();
+ case EglDisplay:
+ return m_eglDisplay;
+ default:
+ break;
+ }
+ return Q_NULLPTR;
+}
+
EGLDisplay QWaylandEglClientBufferIntegration::eglDisplay() const
{
return m_eglDisplay;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
index 75053190d..e28d27e99 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,9 +40,12 @@
QT_BEGIN_NAMESPACE
-class QWaylandWindow;
class QWindow;
+namespace QtWaylandClient {
+
+class QWaylandWindow;
+
class QWaylandEglClientBufferIntegration : public QWaylandClientBufferIntegration
{
public:
@@ -65,6 +60,9 @@ public:
QWaylandWindow *createEglWindow(QWindow *window) Q_DECL_OVERRIDE;
QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const Q_DECL_OVERRIDE;
+ void *nativeResource(NativeResource resource) Q_DECL_OVERRIDE;
+ void *nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) Q_DECL_OVERRIDE;
+
EGLDisplay eglDisplay() const;
private:
@@ -76,4 +74,6 @@ private:
QT_END_NAMESPACE
+}
+
#endif // QWAYLANDEGLINTEGRATION_H
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h b/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h
index 4eadacca2..172d45fe9 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandEglDisplay : public QWaylandDisplay
{
public:
@@ -57,4 +51,6 @@ public:
{ }
};
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
index 9b151a5e8..4842b4d88 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 9b445e10c..2c3697bd8 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,6 +46,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandEglWindow::QWaylandEglWindow(QWindow *window)
: QWaylandWindow(window)
, m_clientBufferIntegration(static_cast<QWaylandEglClientBufferIntegration *>(mDisplay->clientBufferIntegration()))
@@ -106,7 +100,7 @@ void QWaylandEglWindow::updateSurface(bool create)
{
QMargins margins = frameMargins();
QRect rect = geometry();
- QSize sizeWithMargins = rect.size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom());
+ QSize sizeWithMargins = (rect.size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom())) * scale();
// wl_egl_windows must have both width and height > 0
// mesa's egl returns NULL if we try to create a, invalid wl_egl_window, however not all EGL
@@ -175,7 +169,8 @@ GLuint QWaylandEglWindow::contentFBO() const
if (m_resize || !m_contentFBO) {
QOpenGLFramebufferObject *old = m_contentFBO;
- m_contentFBO = new QOpenGLFramebufferObject(geometry().width(), geometry().height(), QOpenGLFramebufferObject::CombinedDepthStencil);
+ QSize fboSize = geometry().size() * scale();
+ m_contentFBO = new QOpenGLFramebufferObject(fboSize.width(), fboSize.height(), QOpenGLFramebufferObject::CombinedDepthStencil);
delete old;
m_resize = false;
@@ -197,4 +192,6 @@ void QWaylandEglWindow::bindContentFBO()
}
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
index 298dd7d25..60722d168 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,9 +40,12 @@
QT_BEGIN_NAMESPACE
-class QWaylandGLContext;
class QOpenGLFramebufferObject;
+namespace QtWaylandClient {
+
+class QWaylandGLContext;
+
class QWaylandEglWindow : public QWaylandWindow
{
public:
@@ -86,6 +81,8 @@ private:
QSurfaceFormat m_format;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDEGLWINDOW_H
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 81c74a7d5..18ed1d61e 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -103,6 +95,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class DecorationsBlitter : public QOpenGLFunctions
{
public:
@@ -143,7 +137,8 @@ public:
QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context());
QRect windowRect = window->window()->frameGeometry();
- glViewport(0, 0, windowRect.width(), windowRect.height());
+ int scale = window->scale() ;
+ glViewport(0, 0, windowRect.width() * scale, windowRect.height() * scale);
glDisable(GL_DEPTH_TEST);
glDisable(GL_BLEND);
@@ -205,7 +200,7 @@ public:
m_blitProgram->setAttributeArray(0, squareVertices, 2);
glBindTexture(GL_TEXTURE_2D, window->contentTexture());
QRect r = window->contentsRect();
- glViewport(r.x(), r.y(), r.width(), r.height());
+ glViewport(r.x(), r.y(), r.width() * scale, r.height() * scale);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
//Cleanup
@@ -265,21 +260,22 @@ QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, QWaylandDisplay *dis
switch (m_format.renderableType()) {
case QSurfaceFormat::OpenVG:
- eglBindAPI(EGL_OPENVG_API);
+ m_api = EGL_OPENVG_API;
break;
#ifdef EGL_VERSION_1_4
# if !defined(QT_OPENGL_ES_2)
case QSurfaceFormat::DefaultRenderableType:
# endif
case QSurfaceFormat::OpenGL:
- eglBindAPI(EGL_OPENGL_API);
+ m_api = EGL_OPENGL_API;
break;
#endif
case QSurfaceFormat::OpenGLES:
default:
- eglBindAPI(EGL_OPENGL_ES_API);
+ m_api = EGL_OPENGL_ES_API;
break;
}
+ eglBindAPI(m_api);
m_context = eglCreateContext(m_eglDisplay, m_config, m_shareEGLContext, eglContextAttrs.constData());
@@ -363,6 +359,15 @@ QWaylandGLContext::~QWaylandGLContext()
bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
{
+ // in QWaylandGLContext() we called eglBindAPI with the correct value. However,
+ // eglBindAPI's documentation says:
+ // "eglBindAPI defines the current rendering API for EGL in the thread it is called from"
+ // Since makeCurrent() can be called from a different thread than the one we created the
+ // context in make sure to call eglBindAPI in the correct thread.
+ if (eglQueryAPI() != m_api) {
+ eglBindAPI(m_api);
+ }
+
QWaylandEglWindow *window = static_cast<QWaylandEglWindow *>(surface);
EGLSurface eglSurface = window->eglSurface();
@@ -546,4 +551,6 @@ EGLConfig QWaylandGLContext::eglConfig() const
return m_config;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
index 5528eca7d..bc92c9501 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,10 +42,13 @@
QT_BEGIN_NAMESPACE
-class QWaylandWindow;
-class QWaylandGLWindowSurface;
class QOpenGLShaderProgram;
class QOpenGLTextureCache;
+
+namespace QtWaylandClient {
+
+class QWaylandWindow;
+class QWaylandGLWindowSurface;
class DecorationsBlitter;
class QWaylandGLContext : public QPlatformOpenGLContext
@@ -90,10 +85,13 @@ private:
QSurfaceFormat m_format;
DecorationsBlitter *m_blitter;
bool mUseNativeDefaultFbo;
+ uint m_api;
friend class DecorationsBlitter;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDGLCONTEXT_H
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
index fbb715df1..0c4da7469 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeEGLClientBufferIntegration::QWaylandXCompositeEGLClientBufferIntegration()
: QWaylandClientBufferIntegration()
, mWaylandDisplay(0)
@@ -149,4 +143,6 @@ void QWaylandXCompositeEGLClientBufferIntegration::rootInformation(void *data, q
qDebug() << "ROOT INFORMATION" << integration->mDisplay << integration->mRootWindow << integration->mScreen;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
index 1d0f71fb3..a9bab089d 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -69,6 +61,8 @@ struct qt_xcomposite_listener;
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeEGLClientBufferIntegration : public QWaylandClientBufferIntegration
{
public:
@@ -110,6 +104,8 @@ private:
uint32_t root_window);
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEEGLCLIENTBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
index 1c0e58a34..0a9d93a2f 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeEGLContext::QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display, EGLConfig config)
: QEGLPlatformContext(format, share, display, &config)
{
@@ -75,4 +69,6 @@ EGLSurface QWaylandXCompositeEGLContext::eglSurfaceForPlatformSurface(QPlatformS
return static_cast<QWaylandXCompositeEGLWindow *>(surface)->eglSurface();
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
index 7a503a7d8..cbcf2b7c3 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeEGLWindow;
class QWaylandXCompositeEGLContext : public QEGLPlatformContext
@@ -63,6 +57,8 @@ private:
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface);
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEEGLCONTEXT_H
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index 01d632411..dc9b1fb76 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,6 +46,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLClientBufferIntegration *glxIntegration)
: QWaylandWindow(window)
, m_glxIntegration(glxIntegration)
@@ -133,4 +127,6 @@ void QWaylandXCompositeEGLWindow::createEglSurface()
size);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
index b45beaa24..c1e8242c2 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeEGLWindow : public QWaylandWindow
{
public:
@@ -74,6 +68,8 @@ private:
EGLSurface m_surface;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEEGLWINDOW_H
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
index d4fd2c743..8445e9452 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeGLXContext::QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen)
: m_display(display),
m_format(format)
@@ -106,4 +100,6 @@ QSurfaceFormat QWaylandXCompositeGLXContext::format() const
return m_format;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
index de0311262..35078813a 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,6 +41,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeGLXWindow;
class QWaylandShmBuffer;
@@ -73,6 +67,8 @@ private:
QSurfaceFormat m_format;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEGLXCONTEXT_H
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
index 61edd0531..1ad015669 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,6 +43,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeGLXIntegration::QWaylandXCompositeGLXIntegration()
: mWaylandDisplay(0)
, mWaylandComposite(0)
@@ -138,4 +132,6 @@ void QWaylandXCompositeGLXIntegration::rootInformation(void *data, qt_xcomposite
integration->mScreen = XDefaultScreen(integration->mDisplay);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
index 7ee1d9467..2a6c8ffb3 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -64,6 +56,8 @@ struct qt_xcomposite_listener;
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeGLXIntegration : public QWaylandClientBufferIntegration
{
public:
@@ -103,6 +97,8 @@ private:
uint32_t root_window);
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEGLXINTEGRATION_H
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
index 899ed7649..1675b8a5f 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,6 +43,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeGLXWindow::QWaylandXCompositeGLXWindow(QWindow *window, QWaylandXCompositeGLXIntegration *glxIntegration)
: QWaylandWindow(window)
, m_glxIntegration(glxIntegration)
@@ -117,4 +111,6 @@ void QWaylandXCompositeGLXWindow::createSurface()
size);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
index 6fe99466d..b0966d0f4 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +44,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeGLXWindow : public QWaylandWindow
{
public:
@@ -73,6 +67,8 @@ private:
GLXFBConfig m_config;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEGLXWINDOW_H
diff --git a/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
index 94a9772ad..287d3b480 100644
--- a/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
+++ b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,6 +38,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
QWaylandXCompositeBuffer::QWaylandXCompositeBuffer(qt_xcomposite *xcomposite, uint32_t window, const QSize &size)
:mSize(size)
{
@@ -60,4 +54,6 @@ QSize QWaylandXCompositeBuffer::size() const
return mSize;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h
index a2f421666..39ff23f99 100644
--- a/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h
+++ b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +42,8 @@ struct wl_visual;
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeBuffer : public QWaylandBuffer
{
public:
@@ -62,6 +56,8 @@ private:
QSize mSize;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDXCOMPOSITEBUFFER_H
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.cpp b/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.cpp
index d480b2dae..79ea1470d 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.cpp
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h b/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h
index f2f4f7dec..d44a1cd33 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
index 9fc8badd5..9e2ae52b9 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
index dca3fb667..ed70c72c1 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
index 4e9a04495..c0c0058c3 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -127,10 +127,9 @@ DrmEglServerBufferIntegration::~DrmEglServerBufferIntegration()
void DrmEglServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor)
{
- QWindow *window = compositor->window();
Q_ASSERT(QGuiApplication::platformNativeInterface());
- m_egl_display = static_cast<EGLDisplay>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow("egldisplay", window));
+ m_egl_display = static_cast<EGLDisplay>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("egldisplay"));
if (!m_egl_display) {
qWarning("Cant initialize drm egl server buffer integration. Missing egl display from platformplugin");
return;
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
index 501f21d4e..12b4a78f5 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
index 7e7a14ab8..6cf323688 100644
--- a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -131,10 +131,9 @@ LibHybrisEglServerBufferIntegration::~LibHybrisEglServerBufferIntegration()
void LibHybrisEglServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor)
{
- QWindow *window = compositor->window();
Q_ASSERT(QGuiApplication::platformNativeInterface());
- m_egl_display = static_cast<EGLDisplay>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow("egldisplay", window));
+ m_egl_display = static_cast<EGLDisplay>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("egldisplay"));
if (!m_egl_display) {
qWarning("Cant initialize libhybris egl server buffer integration. Missing egl display from platformplugin");
return;
diff --git a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h
index 07d78017b..f3620c097 100644
--- a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h
+++ b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index 3f7487c40..85215f14b 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -119,7 +119,7 @@ void WaylandEglClientBufferIntegration::initializeHardware(QtWayland::Display *w
return;
}
- d->egl_display = nativeInterface->nativeResourceForWindow("EglDisplay", m_compositor->window());
+ d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
if (!d->egl_display) {
qWarning("QtCompositor: Failed to initialize EGL display. Could not get EglDisplay for window.");
return;
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
index c5dd6ad68..5f660e98a 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
index 2401d6710..b96e3c85d 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -78,10 +78,10 @@ void XCompositeEglClientBufferIntegration::initializeHardware(QtWayland::Display
{
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
if (nativeInterface) {
- mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForWindow("Display",m_compositor->window()));
+ mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForIntegration("Display"));
if (!mDisplay)
qFatal("could not retireve Display from platform integration");
- mEglDisplay = static_cast<EGLDisplay>(nativeInterface->nativeResourceForWindow("EGLDisplay",m_compositor->window()));
+ mEglDisplay = static_cast<EGLDisplay>(nativeInterface->nativeResourceForIntegration("EGLDisplay"));
if (!mEglDisplay)
qFatal("could not retrieve EGLDisplay from platform integration");
} else {
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
index cf5acdd34..98cb49c3c 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
index bd5ddef9a..cedee6c5f 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -89,7 +89,7 @@ void XCompositeGLXClientBufferIntegration::initializeHardware(QtWayland::Display
qDebug() << "Initializing GLX integration";
QPlatformNativeInterface *nativeInterface = QGuiApplicationPrivate::platformIntegration()->nativeInterface();
if (nativeInterface) {
- mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForWindow("Display",m_compositor->window()));
+ mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForIntegration("Display"));
if (!mDisplay)
qFatal("could not retireve Display from platform integration");
} else {
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
index 6d28a3de4..d70f5a568 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp
index 09789d864..a3eaac37a 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
index a50c69009..924706627 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp
index 5e002377e..682b877e9 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -50,9 +50,7 @@ QT_BEGIN_NAMESPACE
XCompositeHandler::XCompositeHandler(QtWayland::Compositor *compositor, Display *display)
: QtWaylandServer::qt_xcomposite(compositor->wl_display(), 1)
{
- compositor->window()->create();
-
- mFakeRootWindow = new QWindow(compositor->window());
+ mFakeRootWindow = new QWindow();
mFakeRootWindow->setGeometry(QRect(-1,-1,1,1));
mFakeRootWindow->create();
mFakeRootWindow->show();
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
index 678ad4460..70b6236c7 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h b/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h
index 733fd6fd0..52fd73a39 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h
+++ b/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Compositor.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index c249248c3..00a91e242 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -1,41 +1,33 @@
/****************************************************************************
**
** Copyright (C) 2014 Robin Burchell <robin.burchell@viroteck.net>
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,6 +46,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
#define BUTTON_SPACING 5
#ifndef QT_NO_IMAGEFORMAT_XPM
@@ -446,6 +440,7 @@ QWaylandAbstractDecoration *QWaylandBradientDecorationPlugin::create(const QStri
return new QWaylandBradientDecoration();
}
+}
QT_END_NAMESPACE
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
index c023332eb..68befb44b 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const
return new QWaylandBrcmEglIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
index 0aba49ddd..827228d2b 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
@@ -1,6 +1,9 @@
PLUGIN_TYPE = wayland-graphics-integration-client
load(qt_plugin)
+# We have a bunch of C code with casts, so we can't have this option
+QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual
+
QT += waylandclient-private
include(../../../../hardwareintegration/client/drm-egl-server/drm-egl-server.pri)
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
index 6a3df4431..ef9126633 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString&
return new DrmEglServerBufferIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp b/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
index 9aee15790..e51c4bfb5 100644
--- a/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class LibHybrisEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QWaylandServerBufferIntegration *LibHybrisEglServerBufferPlugin::create(const QS
return new LibHybrisEglServerBufferIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
index e4cd8c1f0..3830e705b 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QSt
return new QWaylandEglClientBufferIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
index 4b9835f1d..4290fe28a 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlu
return new QWaylandXCompositeEGLClientBufferIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro
index 97e642fbb..1af178669 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro
@@ -1,6 +1,9 @@
PLUGIN_TYPE = wayland-graphics-integration-client
load(qt_plugin)
+# We have a bunch of C code with casts, so we can't have this option
+QMAKE_CXXFLAGS_WARN_ON -= -Wcast-qual
+
QT += waylandclient-private
include(../../../../hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri)
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
index 2c6f0fde8..792894232 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlu
return new QWaylandXCompositeGLXIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
index f6bb717bc..7996e4fe6 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
index e85f93009..33bd82eff 100644
--- a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/main.cpp b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/main.cpp
index 10751266c..004cd6c86 100644
--- a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
index 3a7984f0a..4f0e1ab1d 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
index f0bbedaa7..a8a366732 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
index 37602bcc9..acf45e161 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index 73b2d3b64..286765450 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
return new QWaylandBrcmEglPlatformIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
index 8260a2671..a129053a7 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandBrcmEglPlatformIntegration : public QWaylandIntegration
{
public:
@@ -65,6 +59,8 @@ private:
QWaylandClientBufferIntegration *m_gl_integration;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp
index 010a23e25..19e65300a 100644
--- a/src/plugins/platforms/qwayland-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
return new QWaylandEglPlatformIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
index 5f23f68de..5cf3f1dbc 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandEglPlatformIntegration : public QWaylandIntegration
{
public:
@@ -65,6 +59,8 @@ private:
QWaylandEglClientBufferIntegration *m_client_buffer_integration;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/plugins/platforms/qwayland-generic/main.cpp b/src/plugins/platforms/qwayland-generic/main.cpp
index e1761d8e8..497e796b8 100644
--- a/src/plugins/platforms/qwayland-generic/main.cpp
+++ b/src/plugins/platforms/qwayland-generic/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
return new QWaylandIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
index d3f5a0b54..48ab17929 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
@@ -59,6 +53,8 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
return new QWaylandXCompositeEglPlatformIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
index 340ab03c3..18a9b641c 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +40,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandXCompositeEglPlatformIntegration : public QWaylandIntegration
{
public:
@@ -65,6 +59,8 @@ private:
QWaylandClientBufferIntegration *m_client_buffer_integration;
};
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
index fb2b1414e..16f0fe119 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,6 +38,8 @@
QT_BEGIN_NAMESPACE
+namespace QtWaylandClient {
+
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
@@ -61,6 +55,8 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
return new QWaylandXCompositeGlxPlatformIntegration();
}
+}
+
QT_END_NAMESPACE
#include "main.moc"
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
index a7308f643..ef63303bc 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,6 +39,10 @@
#include "qwaylandxcompositeglxintegration.h"
+QT_BEGIN_NAMESPACE
+
+namespace QtWaylandClient {
+
class QWaylandXCompositeGlxPlatformIntegration : public QWaylandIntegration
{
public:
@@ -64,4 +60,8 @@ private:
QWaylandClientBufferIntegration *m_client_buffer_integration;
};
+}
+
+QT_END_NAMESPACE
+
#endif
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index ae5ec40db..784687d26 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -96,6 +88,7 @@ struct WaylandArgument {
struct WaylandEvent {
bool request;
QByteArray name;
+ QByteArray type;
QList<WaylandArgument> arguments;
};
@@ -132,6 +125,7 @@ WaylandEvent readEvent(QXmlStreamReader &xml, bool request)
WaylandEvent event;
event.request = request;
event.name = byteArrayValue(xml, "name");
+ event.type = byteArrayValue(xml, "type");
while (xml.readNextStartElement()) {
if (xml.name() == "arg") {
WaylandArgument argument;
@@ -1006,6 +1000,8 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
}
}
printf(");\n");
+ if (e.type == "destructor")
+ printf(" m_%s = 0;\n", interfaceName);
printf(" }\n");
}
diff --git a/src/shared/qwaylandmimehelper.cpp b/src/shared/qwaylandmimehelper.cpp
index 94a107c81..ce193812d 100644
--- a/src/shared/qwaylandmimehelper.cpp
+++ b/src/shared/qwaylandmimehelper.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/shared/qwaylandmimehelper.h b/src/shared/qwaylandmimehelper.h
index 539fc3adc..5db0484a2 100644
--- a/src/shared/qwaylandmimehelper.h
+++ b/src/shared/qwaylandmimehelper.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/shared/qwaylandshmformathelper.h b/src/shared/qwaylandshmformathelper.h
new file mode 100644
index 000000000..2923e0106
--- /dev/null
+++ b/src/shared/qwaylandshmformathelper.h
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDSHMFORMATHELPER_H
+#define QWAYLANDSHMFORMATHELPER_H
+
+#include <QtGui/QImage>
+
+//the correct protocol header for the wayland server or wayland client has to be
+//included before this file is included
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandShmFormatHelper
+{
+public:
+ static inline wl_shm_format fromQImageFormat(QImage::Format format);
+ static inline QImage::Format fromWaylandShmFormat(wl_shm_format format);
+ static inline QVector<wl_shm_format> supportedWaylandFormats();
+
+private:
+//IMPLEMENTATION (which has to be inline in the header because of the include trick)
+ struct Array
+ {
+ Array(const size_t size, const wl_shm_format *data)
+ : size(size)
+ , data(data)
+ { }
+ const size_t size;
+ const wl_shm_format *data;
+ };
+
+ static const Array getData()
+ {
+ static wl_shm_format formats_array[] = {
+ wl_shm_format(INT_MIN), //Format_Invalid,
+ wl_shm_format(INT_MIN), //Format_Mono,
+ wl_shm_format(INT_MIN), //Format_MonoLSB,
+ wl_shm_format(INT_MIN), //Format_Indexed8,
+ WL_SHM_FORMAT_XRGB8888, //Format_RGB32,
+ WL_SHM_FORMAT_ARGB8888, //Format_ARGB32,
+ WL_SHM_FORMAT_ARGB8888, //Format_ARGB32_Premultiplied,
+ WL_SHM_FORMAT_RGB565, //Format_RGB16,
+ wl_shm_format(INT_MIN), //Format_ARGB8565_Premultiplied,
+ wl_shm_format(INT_MIN), //Format_RGB666,
+ wl_shm_format(INT_MIN), //Format_ARGB6666_Premultiplied,
+ WL_SHM_FORMAT_XRGB1555, //Format_RGB555,
+ wl_shm_format(INT_MIN), //Format_ARGB8555_Premultiplied,
+ WL_SHM_FORMAT_RGB888, //Format_RGB888,
+ WL_SHM_FORMAT_XRGB4444, //Format_RGB444,
+ WL_SHM_FORMAT_ARGB4444, //Format_ARGB4444_Premultiplied,
+ WL_SHM_FORMAT_XBGR8888, //Format_RGBX8888,
+ WL_SHM_FORMAT_ABGR8888, //Format_RGBA8888,
+ WL_SHM_FORMAT_ABGR8888, //Format_RGBA8888_Premultiplied,
+ WL_SHM_FORMAT_XBGR2101010, //Format_BGR30,
+ WL_SHM_FORMAT_ARGB2101010, //Format_A2BGR30_Premultiplied,
+ WL_SHM_FORMAT_XRGB2101010, //Format_RGB30,
+ WL_SHM_FORMAT_ARGB2101010, //Format_A2RGB30_Premultiplied,
+ WL_SHM_FORMAT_C8, //Format_Alpha8,
+ WL_SHM_FORMAT_C8 //Format_Grayscale8,
+ };
+ const size_t size = sizeof(formats_array) / sizeof(*formats_array);
+ return Array(size, formats_array);
+ }
+};
+
+wl_shm_format QWaylandShmFormatHelper::fromQImageFormat(QImage::Format format)
+{
+ Array array = getData();
+ if (array.size <= size_t(format))
+ return wl_shm_format(INT_MIN);
+ return array.data[format];
+}
+
+QImage::Format QWaylandShmFormatHelper::fromWaylandShmFormat(wl_shm_format format)
+{
+ Array array = getData();
+ for (size_t i = 0; i < array.size; i++) {
+ if (array.data[i] == format)
+ return QImage::Format(i);
+ }
+ return QImage::Format_Invalid;
+}
+
+QVector<wl_shm_format> QWaylandShmFormatHelper::supportedWaylandFormats()
+{
+ QVector<wl_shm_format> retFormats;
+ Array array = getData();
+ for (size_t i = 0; i < array.size; i++) {
+ if (int(array.data[i]) != INT_MIN
+ && !retFormats.contains(array.data[i])) {
+ retFormats.append(array.data[i]);
+ }
+ }
+ return retFormats;
+}
+
+QT_END_NAMESPACE
+
+#endif //QWAYLANDSHMFORMATHELPER_H
diff --git a/tests/auto/client/mockcompositor.cpp b/tests/auto/client/mockcompositor.cpp
index 665b7dd73..2f73734f1 100644
--- a/tests/auto/client/mockcompositor.cpp
+++ b/tests/auto/client/mockcompositor.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mockcompositor.h b/tests/auto/client/mockcompositor.h
index 03d3a96a3..cf3b270a2 100644
--- a/tests/auto/client/mockcompositor.h
+++ b/tests/auto/client/mockcompositor.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mockinput.cpp b/tests/auto/client/mockinput.cpp
index 754aa4590..5b1d4f4fd 100644
--- a/tests/auto/client/mockinput.cpp
+++ b/tests/auto/client/mockinput.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mockinput.h b/tests/auto/client/mockinput.h
index 16b19b4fb..7d36a5325 100644
--- a/tests/auto/client/mockinput.h
+++ b/tests/auto/client/mockinput.h
@@ -1,41 +1,33 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2013 Klarälvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mockoutput.cpp b/tests/auto/client/mockoutput.cpp
index 9b948ad4d..573de90b9 100644
--- a/tests/auto/client/mockoutput.cpp
+++ b/tests/auto/client/mockoutput.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mockshell.cpp b/tests/auto/client/mockshell.cpp
index 2a5969f70..dfc39e5e4 100644
--- a/tests/auto/client/mockshell.cpp
+++ b/tests/auto/client/mockshell.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mocksurface.cpp b/tests/auto/client/mocksurface.cpp
index 330213bde..b6d338b29 100644
--- a/tests/auto/client/mocksurface.cpp
+++ b/tests/auto/client/mocksurface.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/mocksurface.h b/tests/auto/client/mocksurface.h
index 33ced4385..821d49f54 100644
--- a/tests/auto/client/mocksurface.h
+++ b/tests/auto/client/mocksurface.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/client/tst_client.cpp b/tests/auto/client/tst_client.cpp
index 113f9d9a8..dd35b681c 100644
--- a/tests/auto/client/tst_client.cpp
+++ b/tests/auto/client/tst_client.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/compositor/BLACKLIST b/tests/auto/compositor/BLACKLIST
new file mode 100644
index 000000000..df4672be3
--- /dev/null
+++ b/tests/auto/compositor/BLACKLIST
@@ -0,0 +1,2 @@
+[keyboardGrab]
+ubuntu-14.04
diff --git a/tests/auto/compositor/compositor.pro b/tests/auto/compositor/compositor.pro
index d173d2ed6..035beeb41 100644
--- a/tests/auto/compositor/compositor.pro
+++ b/tests/auto/compositor/compositor.pro
@@ -24,7 +24,11 @@ SOURCES += tst_compositor.cpp \
testcompositor.cpp \
testkeyboardgrabber.cpp \
mockclient.cpp \
+ mockseat.cpp \
+ testinputdevice.cpp
HEADERS += testcompositor.h \
testkeyboardgrabber.h \
mockclient.h \
+ mockseat.h \
+ testinputdevice.h
diff --git a/tests/auto/compositor/mockclient.cpp b/tests/auto/compositor/mockclient.cpp
index 9bbe56519..33847da7d 100644
--- a/tests/auto/compositor/mockclient.cpp
+++ b/tests/auto/compositor/mockclient.cpp
@@ -1,45 +1,38 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "mockclient.h"
+#include "mockseat.h"
#include <QElapsedTimer>
#include <QSocketNotifier>
@@ -90,7 +83,8 @@ MockClient::MockClient()
const wl_output_listener MockClient::outputListener = {
MockClient::outputGeometryEvent,
MockClient::outputModeEvent,
- MockClient::outputDone
+ MockClient::outputDone,
+ MockClient::outputScale
};
MockClient::~MockClient()
@@ -118,6 +112,11 @@ void MockClient::outputDone(void *, wl_output *)
}
+void MockClient::outputScale(void *, wl_output *, int)
+{
+
+}
+
void MockClient::readEvents()
{
wl_display_dispatch(display);
@@ -145,6 +144,9 @@ void MockClient::handleGlobal(uint32_t id, const QByteArray &interface)
shm = static_cast<wl_shm *>(wl_registry_bind(registry, id, &wl_shm_interface, 1));
} else if (interface == "wl_shell") {
wlshell = static_cast<wl_shell *>(wl_registry_bind(registry, id, &wl_shell_interface, 1));
+ } else if (interface == "wl_seat") {
+ wl_seat *s = static_cast<wl_seat *>(wl_registry_bind(registry, id, &wl_seat_interface, 1));
+ m_seats << new MockSeat(s);
}
}
@@ -189,7 +191,7 @@ ShmBuffer::ShmBuffer(const QSize &size, wl_shm *shm)
return;
}
- image = QImage(static_cast<uchar *>(data), size.width(), size.height(), stride, QImage::Format_ARGB32_Premultiplied);
+ image = QImage(static_cast<uchar *>(data), size.width(), size.height(), stride, QImage::Format_ARGB32);
shm_pool = wl_shm_create_pool(shm,fd,alloc);
handle = wl_shm_pool_create_buffer(shm_pool,0, size.width(), size.height(),
stride, WL_SHM_FORMAT_ARGB8888);
diff --git a/tests/auto/compositor/mockclient.h b/tests/auto/compositor/mockclient.h
index de1084ab9..8647205f2 100644
--- a/tests/auto/compositor/mockclient.h
+++ b/tests/auto/compositor/mockclient.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +36,9 @@
#include <QObject>
#include <QImage>
#include <QRect>
+#include <QList>
+
+class MockSeat;
class ShmBuffer
{
@@ -74,6 +69,8 @@ public:
wl_registry *registry;
wl_shell *wlshell;
+ QList<MockSeat *> m_seats;
+
QRect geometry;
int fd;
@@ -104,6 +101,7 @@ private:
int height,
int refresh);
static void outputDone(void *data, wl_output *output);
+ static void outputScale(void *data, wl_output *output, int factor);
void handleGlobal(uint32_t id, const QByteArray &interface);
diff --git a/tests/auto/compositor/mockseat.cpp b/tests/auto/compositor/mockseat.cpp
new file mode 100644
index 000000000..ebf387f94
--- /dev/null
+++ b/tests/auto/compositor/mockseat.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd., author: <mikko.levonmaa@lge.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mockseat.h"
+
+MockSeat::MockSeat(wl_seat *seat)
+ : m_seat(seat)
+{
+ // Bind to the keyboard interface so that the compositor has
+ // the right resource associations
+ m_keyboard = wl_seat_get_keyboard(seat);
+}
+
+MockSeat::~MockSeat()
+{
+ wl_keyboard_destroy(m_keyboard);
+ wl_seat_destroy(m_seat);
+}
diff --git a/tests/auto/compositor/mockseat.h b/tests/auto/compositor/mockseat.h
new file mode 100644
index 000000000..24399a448
--- /dev/null
+++ b/tests/auto/compositor/mockseat.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics Ltd., author: <mikko.levonmaa@lge.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef MOCKSEAT
+#define MOCKSEAT
+
+#include <QObject>
+#include <wayland-client.h>
+
+class MockSeat : public QObject
+{
+ Q_OBJECT
+
+public:
+ MockSeat(wl_seat *seat);
+ ~MockSeat();
+
+ wl_seat *m_seat;
+ wl_keyboard *m_keyboard;
+};
+#endif
diff --git a/tests/auto/compositor/testcompositor.cpp b/tests/auto/compositor/testcompositor.cpp
index cf7c8eb15..95dd87e3c 100644
--- a/tests/auto/compositor/testcompositor.cpp
+++ b/tests/auto/compositor/testcompositor.cpp
@@ -1,48 +1,41 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "testcompositor.h"
-TestCompositor::TestCompositor(QWaylandCompositor::ExtensionFlag flags) : QWaylandCompositor(0, 0, flags)
+TestCompositor::TestCompositor(QWaylandCompositor::ExtensionFlag flags) : QWaylandCompositor(0, flags)
{
+ createOutput(0, "", "");
addDefaultShell();
}
diff --git a/tests/auto/compositor/testcompositor.h b/tests/auto/compositor/testcompositor.h
index e504cd47b..c7d571d23 100644
--- a/tests/auto/compositor/testcompositor.h
+++ b/tests/auto/compositor/testcompositor.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/compositor/testinputdevice.cpp b/tests/auto/compositor/testinputdevice.cpp
new file mode 100644
index 000000000..db2d1d706
--- /dev/null
+++ b/tests/auto/compositor/testinputdevice.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics, Inc., author: <mikko.levonmaa@lge.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "testinputdevice.h"
+
+#include <QMouseEvent>
+
+TestInputDevice::TestInputDevice(QWaylandCompositor *compositor, QWaylandInputDevice::CapabilityFlags caps)
+ : QWaylandInputDevice(compositor, caps)
+{
+ m_queryCount = 0;
+}
+
+TestInputDevice::~TestInputDevice()
+{
+}
+
+bool TestInputDevice::isOwner(QInputEvent *event)
+{
+ m_queryCount++;
+ QMouseEvent *me = dynamic_cast<QMouseEvent *>(event);
+ return m_events.contains(me);
+}
+
+QList<QMouseEvent *> TestInputDevice::createMouseEvents(int count)
+{
+ for (int i = 0; i < count; i++) {
+ m_events.append(new QMouseEvent(QEvent::MouseMove, QPointF(10 + i, 10 + i), Qt::NoButton, Qt::NoButton, Qt::NoModifier));
+ }
+ return m_events;
+}
+
diff --git a/tests/auto/compositor/testinputdevice.h b/tests/auto/compositor/testinputdevice.h
new file mode 100644
index 000000000..255c2ac8d
--- /dev/null
+++ b/tests/auto/compositor/testinputdevice.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 LG Electronics, Inc., author: <mikko.levonmaa@lge.com>
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QWaylandInputDevice>
+#include <QList>
+
+class QInputEvent;
+class QMouseEvent;
+
+class TestInputDevice : public QWaylandInputDevice
+{
+
+public:
+
+ TestInputDevice(QWaylandCompositor *compositor, QWaylandInputDevice::CapabilityFlags caps);
+ ~TestInputDevice();
+
+ bool isOwner(QInputEvent *event);
+
+ QList<QMouseEvent *> createMouseEvents(int count);
+
+ int queryCount() { return m_queryCount; }
+
+private:
+ int m_queryCount;
+ QList<QMouseEvent *> m_events;
+};
diff --git a/tests/auto/compositor/testkeyboardgrabber.cpp b/tests/auto/compositor/testkeyboardgrabber.cpp
index 657ba3cbe..da2f467d9 100644
--- a/tests/auto/compositor/testkeyboardgrabber.cpp
+++ b/tests/auto/compositor/testkeyboardgrabber.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 LG Electronics, Inc., author: <mikko.levonmaa@lge.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/compositor/testkeyboardgrabber.h b/tests/auto/compositor/testkeyboardgrabber.h
index 38f2448ef..0ce56b1a7 100644
--- a/tests/auto/compositor/testkeyboardgrabber.h
+++ b/tests/auto/compositor/testkeyboardgrabber.h
@@ -1,40 +1,32 @@
/****************************************************************************
**
** Copyright (C) 2014 LG Electronics, Inc., author: <mikko.levonmaa@lge.com>
-** Contact: http://www.qt-project.org/legal
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/compositor/tst_compositor.cpp b/tests/auto/compositor/tst_compositor.cpp
index e97d3b16d..8932374ca 100644
--- a/tests/auto/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/tst_compositor.cpp
@@ -1,40 +1,32 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
+** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,6 +37,8 @@
#include "QtCompositor/private/qwlkeyboard_p.h"
#include "QtCompositor/private/qwlinputdevice_p.h"
+#include "QtCompositor/private/qwlcompositor_p.h"
+#include "testinputdevice.h"
#include "qwaylandbufferref.h"
@@ -64,6 +58,8 @@ public:
private slots:
void inputDeviceCapabilities();
void keyboardGrab();
+ void inputDeviceCreation();
+ void inputDeviceKeyboardFocus();
void singleClient();
void multipleClients();
void geometry();
@@ -83,10 +79,11 @@ void tst_WaylandCompositor::singleClient()
wl_surface *sb = client.createSurface();
QTRY_COMPARE(compositor.surfaces.size(), 2);
- WaylandClient *ca = compositor.surfaces.at(0)->client();
- WaylandClient *cb = compositor.surfaces.at(1)->client();
+ QWaylandClient *ca = compositor.surfaces.at(0)->client();
+ QWaylandClient *cb = compositor.surfaces.at(1)->client();
QCOMPARE(ca, cb);
+ QVERIFY(ca != 0);
QList<QWaylandSurface *> surfaces = compositor.surfacesForClient(ca);
QCOMPARE(surfaces.size(), 2);
@@ -114,13 +111,14 @@ void tst_WaylandCompositor::multipleClients()
QTRY_COMPARE(compositor.surfaces.size(), 3);
- WaylandClient *ca = compositor.surfaces.at(0)->client();
- WaylandClient *cb = compositor.surfaces.at(1)->client();
- WaylandClient *cc = compositor.surfaces.at(2)->client();
+ QWaylandClient *ca = compositor.surfaces.at(0)->client();
+ QWaylandClient *cb = compositor.surfaces.at(1)->client();
+ QWaylandClient *cc = compositor.surfaces.at(2)->client();
QVERIFY(ca != cb);
QVERIFY(ca != cc);
QVERIFY(cb != cc);
+ QVERIFY(ca != 0);
QCOMPARE(compositor.surfacesForClient(ca).size(), 1);
QCOMPARE(compositor.surfacesForClient(ca).at(0), compositor.surfaces.at(0));
@@ -321,5 +319,74 @@ void tst_WaylandCompositor::inputDeviceCapabilities()
QTRY_COMPARE(k, dev.keyboardDevice());
}
+void tst_WaylandCompositor::inputDeviceCreation()
+{
+ TestCompositor compositor;
+ TestInputDevice dev1(&compositor, QWaylandInputDevice::Pointer | QWaylandInputDevice::Keyboard);
+ TestInputDevice dev2(&compositor, QWaylandInputDevice::Pointer | QWaylandInputDevice::Keyboard);
+
+ compositor.handle()->registerInputDevice(&dev1);
+ compositor.handle()->registerInputDevice(&dev2);
+
+ // The compositor will create the default input device
+ QTRY_COMPARE(compositor.handle()->inputDevices().count(), 3);
+ // Test the order
+ QTRY_COMPARE(compositor.handle()->inputDevices().at(0), &dev2);
+ QTRY_COMPARE(compositor.handle()->inputDevices().at(1), &dev1);
+ QTRY_COMPARE(compositor.handle()->inputDevices().at(2), compositor.defaultInputDevice());
+
+ QList<QMouseEvent *> allEvents;
+ allEvents += dev1.createMouseEvents(2);
+ allEvents += dev2.createMouseEvents(5);
+ foreach (QMouseEvent *me, allEvents) {
+ compositor.inputDeviceFor(me);
+ }
+
+ // The first input device will only get called exatly the number of times it has created
+ // the events
+ QTRY_COMPARE(dev1.queryCount(), 2);
+ // The second will get called the total number of times as it sits as the first item in
+ // the registered input devices list
+ QTRY_COMPARE(dev2.queryCount(), 7);
+}
+
+void tst_WaylandCompositor::inputDeviceKeyboardFocus()
+{
+ TestCompositor compositor;
+
+
+ TestInputDevice dev1(&compositor, QWaylandInputDevice::Keyboard);
+ TestInputDevice dev2(&compositor, QWaylandInputDevice::Keyboard);
+
+ compositor.handle()->registerInputDevice(&dev1);
+ compositor.handle()->registerInputDevice(&dev2);
+
+ // Create client after all the input devices have been set up as the mock client
+ // does not dynamically listen to new seats
+ MockClient client;
+ wl_surface *surface = client.createSurface();
+ QTRY_COMPARE(compositor.surfaces.size(), 1);
+
+ QWaylandSurface *waylandSurface = compositor.surfaces.at(0);
+ QList<QWaylandInputDevice *> devices = compositor.handle()->inputDevices();
+ foreach (QWaylandInputDevice *dev, devices) {
+ dev->setKeyboardFocus(waylandSurface);
+ }
+ QTRY_COMPARE(compositor.defaultInputDevice()->keyboardFocus(), waylandSurface);
+ QTRY_COMPARE(dev1.keyboardFocus(), waylandSurface);
+ QTRY_COMPARE(dev2.keyboardFocus(), waylandSurface);
+
+ wl_surface_destroy(surface);
+ QTRY_VERIFY(compositor.surfaces.size() == 0);
+ // This will normally be called for example in the quick compositor
+ // but here call it manually to get rid of the surface and have it reset
+ // the focus
+ compositor.handle()->cleanupGraphicsResources();
+
+ QTRY_VERIFY(!compositor.defaultInputDevice()->keyboardFocus());
+ QTRY_VERIFY(!dev1.keyboardFocus());
+ QTRY_VERIFY(!dev2.keyboardFocus());
+}
+
#include <tst_compositor.moc>
QTEST_MAIN(tst_WaylandCompositor);