Giter VIP home page Giter VIP logo

gtkplatform's Introduction

introduction

gtkplatform is a Qt Platform Abstraction plugin providing Qt applications with the capability to use gtk+ as a host toolkit, primarily intended for use on Linux desktops.

That is: it lets Qt applications render with native gtk+ menus, and use gtk+ for input (mouse, keyboard, touch), and getting window content on screen, the same as it uses e.g. cocoa on macOS for instance.

Thanks to:

  • Robin Burchell (@rburchell, initial idea & heavy lifting)
  • John Brooks (@special, rendering work and OpenGL implementation)
  • Gunnar Sletta (@sletta, all sorts of assistance and brainstorming)
  • Donald Carr (@sirspudd, Arch Linux packaging)

If you'd like to have a chat with us, feel free to drop in on Telegram.

what this is

It's a way to get better integrated, consistent application behaviour on the Linux desktop.

what this is not

It's not the most performant way to run applications, and as a result, not well suited for the embedded environment. This is particularly noticable with QtQuick applications, as they make use of OpenGL. This goes through a copy step: the scene is drawn offscreen, copied, and uploaded to the gtk+ window, which is rather inefficient. Hopefully, gtk+ will grow API to allow this to be done better in the future.

current state

What works:

  • Showing, resizing, and hiding windows windows (all hopefully flicker-free)
  • Rendering in those windows
    • Using QPainter
    • Using QOpenGLContext
    • A mix of OpenGL and software rendering in those windows (QOpenGLWidget, etc)
    • QtWebEngine (if patched, tracked at #9)
  • Simple clipboard interaction (text/image copying)
  • Native gtk+ dialogs (taken from Qt)
  • Native gtk+ menubar
  • Notifications using libnotify
  • Input events
    • Touch
    • Keyboard
    • Mouse, including smooth scroll events

Not everything does work, though. See the known issues section.

screenshots

Here's Qt Creator running with the gtk+ platform plugin:

Creator with the gtk+ platform plugin

If you'd like to see more, go take a look at the wiki.

building

These are the versions I test with.

  • Qt 5.10.1
  • gtk+ 3.22.30
  • libnotify 0.7.7

These are all available in Fedora 28, which is where I do testing/development. Good support is also available on Arch Linux, using the package generously maintained by @sirspudd.

Note that on Fedora, you need qt5-qtbase-static and redhat-rpm-config installed to build from source.

Other distributions may, or may not work, but I don't have any involvement with them.

With dependencies installed:

  • qmake
  • make
  • make install (as root)

Then try launch something after setting QT_QPA_PLATFORM=gtk (or -platform gtk as a command line option)

history

Qt is pretty portable. I don't think there's any doubt to this statement; just take a look at the vast myriad of platform ports out there. It runs on macOS, Windows, even Haiku. It's everywhere.

There's a bit of a fly in the ointment, though: on the Linux desktop, things aren't quite so well defined. There isn't a "sanctioned" platform toolkit. As a result, Qt has to do quite a lot of heavy lifting itself, and this doesn't always result in something that is too well integrated with the host desktop system.

As an additional problem, the Linux desktop world is changing. The stability (which some may consider stagnation) of xcb has been giving way to the rise of Wayland. In many ways, this change has been beneficial: it's a lot harder to introduce some bad graphical glitches like flicker on resize. On the other hand, it introduces a host of its own brand new problems.

Even discounting all of these as solvable problems on top of the usual things like reasonably performant flicker-free graphics that we ought to have and ought to be able to take for granted, there's the root issue that there is a significant amount of duplicate work going on here: any new development has to be solved in (at least) two major toolkits.

So with this background, we get to the situation that lead to this project. A while ago, I moved from macOS back to Linux as my day to day desktop system, and quickly experienced frustration with a myriad of bad, very user-visible bugs on Linux like variances in how high DPI is dealt with, font sizing and selection that wasn't identical, black flicker on resizing, bad trackpad scroll behaviour, the reliance of Qt applications on xwayland rather than being first class Wayland citizens, etc.

This project aims to help mitigate those issues.

Known Issues

  • Popup positioning (like combo box dropdowns) will often be wrong.

    When running on Wayland, this platform plugin will not allow absolute positioning of a window in global coordinate space. Instead, popups are positioned relative to their parent window. This usually manifests as windows appearing very far away from where they ought to have triggered because they failed to set a parent.

  • Notifications don't work right.

    Right now, we're using libnotify, because using GtkApplication without using g_application_run doesn't seem trivial. This means that we're not using the latest and greatest stuff, unfortunately. I'd like to fix this somehow.

  • Accessibility doesn't work

  • Drag and drop doesn't work

    It isn't written yet. There's rather a lot of features like that, actually. I'm sure it will improve with time.

  • My menu shortcuts have funny things in them

    The mapping of GTK+ keys to Qt keys is incomplete. See #8.

  • QtWebEngine doesn't work out of the box

    Correct. Currently there's a hardcoded "whitelist" of platform plugins that will work. The patch to make it work is quite trivial, see src/core/content_browser_client_qt.cpp, and make it request "eglcontext" unconditionally (or when using the "gtk" plugin). See #9.

FAQ

  • Q: But my desktop works just fine. I don't want to use this.

    A: That's fine. Keep using what you are using today, and pretend this doesn't exist.

  • Q: Why is this any better than a theme for Qt which looks like a gtk+ theme?

    A: These are separate, but related concerns. If I was just interested in getting the contents of a window to look like the contents of a Qt window, then sure, a theme/style plugin alone would be more than sufficient.

    More importantly than the contents of the window, though, I want consistency on the level of things underneath theming too. For instance, using this, you get transparent Wayland support that looks and works good right now without having to fix the numerous desktop-related pieces that are missing from QtWayland. You get consistent high DPI support. You get window resizing that doesn't flicker, unlike that of the xcb platform plugin.

    Longer term, I have even bigger goals than this. I want to be able to use platform-native features like GNotification, GtkHeaderBar, app menus, and more. I'd also like to look into mapping GtkGesture into something that Qt applications can make use of, so pinch/rotate/etc all work in the same way across all desktop applications.

    Most of this isn't realised yet, as for the time being I'm focusing on the "basics", but in the longer term I expect it will come. In the short term, this is about a more consistent, more usable out-of-the-box desktop experience.

  • Q: Are you changing Qt's API?

    A: No. Your existing Qt applications of today will work with this with the same amount of tweaking they might need to make when running on a new platform like macOS or Wayland. We may provide some helpers to allow using some gtk+ specific features in future, like GtkHeaderBar, though.

  • Q: Why are you doing this? Qt supports my pet feature better.

    A: That might be true. The main problem here is inconsistencies between different applications on my desktop. I want everything to look, and act the same. And maybe once I have that, we can focus on improving everything at once rather than fighting over who has the better toolkit.

  • Q: Why isn't this part of Qt?

    A: Firstly, it's easier to develop something that is rapidly changing out-of-tree. Secondly, I want this to be usable on my desktop now, not in 6-12 months time.

  • Q: There's no system tray icon support

    A: Correct.

    Given that GtkStatusIcon is deprecated, and the system tray is a dead concept inside GNOME, I don't think this warrants supporting.

  • Q: How does high DPI support work?

    A: We're using gtk+, so, it works the same way it does there. Window size etc is reported in units that aren't real pixels. The window content is drawn by scaling those sizes by the appropriate amount into a larger buffer, which is then drawn by gtk+.

  • Q: How do multiple monitors work?

    A: They probably don't.

    More seriously, I haven't tested them much yet. There's probably going to be a lot of bugs there. When all that stabilizes, though, it should work the same as it does with gtk+ applications.

  • Q: My application doesn't work!

    A: Not exactly a question, but: many applications rely on features of the underlying platform at build time. This of course won't work out of the box in many cases, sometimes due to missing mapping of a feature, and sometimes because it's outright not possible.

    It might be a bug in gtkplatform, or it might be that the application requires adaptation.

  • Q: Does this render using gtk+?

    A: Sort of. With the exception of menu bars on windows, the content of the window is entirely rendered by Qt right now. Once Qt is done with that, it passes over to our code, and we use gtk+ to get that content on screen as well as to provide some of the desktop's settings, like font settings.

    So the reason that widgets look "native" is for the most part not down to the work that we've done, but rather the work of the people who wrote the Adwaita theme plugin. This having been said, it might be an area of interest to look at the possibility of using Pango to render text in the future, rather than fontconfig/freetype.

  • Q: What technologies does this build on?

    A: The "glib" event dispatcher, originally written by Bradley Hughes during his time working on Qt has proven very useful. Without that, this would have been a more difficult task. The "adwaita" QStyle plugin is also great in that it helps the contents of windows blend in very well.

    Of course, none of this would be possible without the work of everyone in the greater Linux desktop community, too, particularly the gtk+ and Qt contributors.

gtkplatform's People

Contributors

amezin avatar linkmauve avatar rburchell avatar sirspudd avatar special avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtkplatform's Issues

Fix native display confusion in QX11Info

The xcb platform plugin has a (IMO poorly named) "display" key to get the DIsplay* handle. The Wayland plugin made a compounding poor decision in top: it overloads "display" to get a wl_display*. The Wayland plugin later added a "wl_display" getter, so it is possible to identify Wayland easily.

This brings me to the crux of the problem: QX11Info::display() gets "display" unconditionally, without making sure it really is a Display*. I think the right way to fix this is to add a new resource, let's say called "x11_display", and to request that instead, and deprecate (and perhaps qWarning()) if "display" is requested, both in the Wayland and XCB plugins.

Similarly for QX11Info::isPlatformX11, it could then request "x11_display", and return false if it wasn't available.

This came up as an issue here.

GTK+3 theme is not applied

theme is set in both ~/.config/gtk-3.0/settings.ini and in x settings daemon (and so it works as expected in all the gtk3 apps, firefox and chrom*) but when running Qt5 apps via gtkplatform apps always end up with default Adwaita theme.

DPI scaling is being applied twice

On the screenshot you can see what menubar have normal 2x scaling but the rest is scaled 4x:

2018-05-08--1525797136_1649x1063_scrot

setting GDK_SCALE=1 fixes the controls/font but makes the menubar and its menus unscaled (1x):

2018-05-08--1525797227_1638x1056_scrot

Make threaded swapBuffers blocking on GtkFrameClock

We should only finish swapBuffers when the content is actually rendered. We can't really do this for the main thread case because all code happens in one place, but happily, we can for the threaded case.

Wrong compiler used when building with RPM packaged Qt

On fedora 26, using the packaged qt5 and qt5-qmake:

g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wno-deprecated-declarations -fno-delete-null-pointer-checks -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -pthread -pthread -pthread -fno-exceptions -Wall -W -Wvla -Wdate-time -dM -E -o .moc/moc_predefs.h /usr/lib64/qt5/mkspecs/features/data/dummy.cpp
g++: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

After commenting out load(qt_build_config) in .qmake.conf, the build works fine.

Can't launch after installing

 vadi   master  ~  Programs  gtkplatform  sudo make install
[sudo] password for vadi: 
cd src/ && ( test -e Makefile || /home/vadi/Programs/Qt/5.9/gcc_64/bin/qmake -o Makefile /home/vadi/Programs/gtkplatform/src/src.pro ) && make -f Makefile install
make[1]: Entering directory '/home/vadi/Programs/gtkplatform/src'
/home/vadi/Programs/Qt/5.9/gcc_64/bin/qmake -install qinstall program ../plugins/platforms/libqgtk.so /home/vadi/Programs/Qt/5.9/gcc_64/plugins/platforms/libqgtk.so
/home/vadi/Programs/Qt/5.9/gcc_64/bin/qmake -install qinstall file /home/vadi/Programs/gtkplatform/lib/cmake/Qt5Gui/Qt5Gui_QGtkIntegrationPlugin.cmake /home/vadi/Programs/Qt/5.9/gcc_64/lib/cmake/Qt5Gui/Qt5Gui_QGtkIntegrationPlugin.cmake
make[1]: Leaving directory '/home/vadi/Programs/gtkplatform/src'
 vadi   master  ~  Programs  gtkplatform  cd ../Mudlet
 vadi  ~  Programs  Mudlet  QT_QPA_PLATFORM=gtk ./Mudlet.AppImage 
This application failed to start because it could not find or load the Qt platform plugin "gtk"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)
 vadi  ~  Programs  Mudlet  134  ./Mudlet.AppImage -platform gtk
This application failed to start because it could not find or load the Qt platform plugin "gtk"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)
 vadi  ~  Programs  Mudlet  134  

Any idea what's going wrong?

Improve QGtkClipboard implementation

Very bare-bones right now, doesn't support anything other than text, doesn't work with Firefox for some reason, doesn't support change signals and a whole bunch of other stuff. Also crashes on tst_qclipboard in qtbase.

Experiment with a QtGtkExtras set of classes

Examples:

QGtkHeaderBar (for providing a GtkHeaderBar using QPlatformNativeInterface to acquire the widget handle).

Perhaps a QGtkWindow (to acquire just the window handle in a "stable" way).

Compile error: Unknown module(s) in QT: egl_support-private

Getting on Ubuntu 18.04 with ppa:beineri/opt-qt-5.11.1-bionic:

mv -f libQt5GtkExtras.so.5.9 ../../lib/ 
make[2]: Leaving directory '/builds/probono/scribus/gtkplatform/src/gtkextras'
cd platform-plugin/ && ( test -e Makefile || /opt/qt511/bin/qmake -o Makefile /builds/probono/scribus/gtkplatform/src/platform-plugin/platform-plugin.pro ) && make -f Makefile 
Project ERROR: Unknown module(s) in QT: egl_support-private
Makefile:70: recipe for target 'sub-platform-plugin-make_first' failed
make[1]: *** [sub-platform-plugin-make_first] Error 3
make[1]: Leaving directory '/builds/probono/scribus/gtkplatform/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2
ERROR: Job failed: exit code 1

Opening images in Telegram Desktop looks weird

Send an image, and then click it to try open it fullscreen. You'll notice that the overlaid window's contents is cropped, like it's drawing too big.

One important detail: Telegram Desktop disables High DPI support. It could be, ironically, that we don't support disabling high DPI properly (e.g. in QGtkOpenGLContext), which means we get it wrong.

Not working with Mudlet

This project is quite interesting to me as I've always had a beef with the non-GTK+ native look on a gnome desktop. Trying to run Mudlet with it doesn't quite work though.

Here's Mudlet built with Qt 5.9 default rendering:

workspace 1_059

And here it is with this plugin enabled:

workspace 1_058

Mudlet sources are available here, though we don't do anything special the the default Qt-specific flags.

Locally integrated menus in headerbar

Is there a plan to make it possible to transfer the application menubars to the headerbar? This is the general idea (exact implementation may differ, obviously)

image

Just wondering what could be done with the headerbars. Is moving some toolbars to the headerbar a possibility?

Compile error against Qt 5.12.1

On Archlinux using Qt 5.12.1 the build fails with:

qgtkwindow_render.cpp: In member function ‘void QGtkWindow::onWindowTickCallback()’:
qgtkwindow_render.cpp:124:40: error: ‘class QWindowPrivate’ has no member named ‘deliverUpdateRequest’
         QWindowPrivate::get(window())->deliverUpdateRequest();
                                        ^~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:794: .obj/qgtkwindow_render.o] Error 1

Consider using GMenu for the platform menu impl

Yes, menus yet again. For the 9001th time.

The current implementation using widgets works reasonably well but it's a little ugly. I don't really think the dynamic creation of items etc is really a well supported usecase, and there's something strange that breaks when trying to remove and readd items that causes menus to vanish in e.g. Creator.

It might be interesting to try use GMenu instead; this seems like a more robust solution, and it's also nice that it is quite decoupled from UI.

I do wonder if this would work with accels still, though...

Some windows have wrong HiDPI scaling initially (until resize)

This started happening with Qt 5.9, I think it was fine in 5.7:

wayland-screenshot-2018-05-09_14-19-01-fs8

The contents aren't rendered at the correct scale until I start resizing the window.

Sometimes it happens to the main application window, sometimes it doesn't (like with Picard here), but it always happens with additional windows, context menus, etc. This is especially bad for context menus.

Implement GLX context creation

With the exception of creating GL contexts, everything in gtkplatform should transparently work for Wayland or X11. Currently only EGL/wayland is implemented.

Implementing GLX contexts should be easy, and should allow gtkplatform to work under X11 as well.

Work on enabling high DPI rendering

See 45fac54 for some context.

We'll need to multiply stuff pretty much everywhere by devicePixelRatio to Qt, and set the surface scale in onDraw appropriately so that GTK doesn't upscale it.

krita crashes when using a scrollwheel (or trackpad pinch zoom) on image content

Krita does some weird and wonderful stuff. They seem to rely on being able to get an X11 connection. So I obliged, and this seems to work to some degree in that it now actually shows content and sort of lets me use it. Unfortunately, scroll events crash:

==9493== Conditional jump or move depends on uninitialised value(s)
==9493==    at 0x5429A69: ~QWeakPointer (qsharedpointer_impl.h:607)
==9493==    by 0x5429A69: ~QPointer (qpointer.h:53)
==9493==    by 0x5429A69: ~UserEvent (qxcbconnection.cpp:498)
==9493==    by 0x5429A69: ~InputEvent (qxcbconnection.cpp:510)
==9493==    by 0x5429A69: ~WheelEvent (qxcbconnection.cpp:545)
==9493==    by 0x5429A69: QWindowSystemInterfacePrivate::WheelEvent::~WheelEvent() (qxcbconnection.cpp:545)
==9493==    by 0xCEDFE3E: QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qwindowsysteminterface.cpp:668)
==9493==    by 0x1F73D00D: userEventSourceDispatch(_GSource, int ()(void), void) (qgtkeventdispatcher.cpp:320)
==9493==    by 0x14184246: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5200.3)
==9493==    by 0x141845E7: ??? (in /usr/lib64/libglib-2.0.so.0.5200.3)
==9493==    by 0x1418467B: g_main_context_iteration (in /usr/lib64/libglib-2.0.so.0.5200.3)
==9493==    by 0x1F73D948: QGtkEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (qgtkeventdispatcher.cpp:490)
==9493==    by 0xD4FF609: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (qeventloop.cpp:212)
==9493==    by 0xD50727B: QCoreApplication::exec() (qcoreapplication.cpp:1261)
==9493==    by 0x21E376: main (main.cc:269)

Note that they do also do some funny stuff with QWindowSystemInterface in their codebase, so it could be related somehow, I really don't know. This will need some more digging.

Segmentation fault with gtk3 3.22.29+60+ge42d8598ca

Distribution: Arch Linux x64
GTK Version: gtk3 3.22.29+60+ge42d8598ca-1
Qt Version: 5.10.1

Problem: With the latest GTK update the gtkplatform Qt module is broken. Applications crash with a segfault.

How to reproduce:

  1. Launch Qt5 Application with environment QT_QPA_PLATFORM=gtk (e.g. keepassx, telegram-desktop)
  2. See the error:
(keepassxc:5600): Gdk-CRITICAL **: 14:17:18.802: gdkdisplay-wayland.c:1317: Truncating shared memory file failed: Invalid argument
Segmentation fault

Going back to gtk3-3.22.29+4+gb485cf91b5 fixes the problem.

Fix QtWebEngine to work with gtkplatform

... and perhaps more platforms in general, by upstreaming a patch removing the hardcoded list of supported platforms.

There's no sense in having this list I think. If it gets a pointer back for eglcontext, it should try to use it - nothing else in Qt has such a hardcoded list of supported platforms.

Font for tab titles is too large

The font used on tab titles, groupbox headers, and a few other things is too large under the GTK plugin, compared to XCB. I've seen this in widgets and qtquickcontrols applications, and I've only tried on a high DPI screen. In some cases it will end up actually clipping off of the widget.

GTK:
zeal-gtk
XCB:
zeal-xcb

Crash trying the photosurface QT example

Arch x86_64
qt5-base 5.9.1-5
qt5-examples 5.9.1-1
qt-gtk-platform-plugin 0.2.0-1

Running photosurface on defaults works fine.

[parker@e55 photosurface]$ QT_QPA_PLATFORM=gtk ./photosurface
Added  0x563f78531570

(photosurface:24458): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'

(photosurface:24458): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(photosurface:24458): GLib-GObject-CRITICAL **: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(photosurface:24458): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(photosurface:24458): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(photosurface:24458): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(photosurface:24458): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(photosurface:24458): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplay'

(photosurface:24458): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(photosurface:24458): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed

(photosurface:24458): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(photosurface:24458): GLib-GObject-CRITICAL **: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault (core dumped)

Coredump (I can post the whole dump if needed)

[parker@e55 photosurface]$ coredumpctl info 24458
           PID: 24458 (photosurface)
           UID: 1000 (parker)
           GID: 1000 (parker)
        Signal: 11 (SEGV)
     Timestamp: Tue 2017-10-10 19:29:08 EDT (3min 21s ago)
  Command Line: ./photosurface
    Executable: /home/parker/photosurface/photosurface
 Control Group: /user.slice/user-1000.slice/[email protected]/gnome-terminal-server.service
          Unit: [email protected]
     User Unit: gnome-terminal-server.service
         Slice: user-1000.slice
     Owner UID: 1000 (parker)
       Boot ID: 8278a228409045689a8a59000a24b623
    Machine ID: ddfeeb3a7dfb45bb837892db11b7e7fc
      Hostname: e55
       Storage: /var/lib/systemd/coredump/core.photosurface.1000.8278a228409045689a8a59000a24b623.24458.1507678148000000.lz4
       Message: Process 24458 (photosurface) of user 1000 dumped core.
                
                Stack trace of thread 24458:
                #0  0x00007f07706c8b2c gdk_display_open (libgdk-x11-2.0.so.0)
                #1  0x00007f0770698732 gdk_display_open_default_libgtk_only (libgdk-x11-2.0.so.0)
                #2  0x00007f0770a5d275 gtk_init (libgtk-x11-2.0.so.0)
                #3  0x00007f0770f83626 n/a (libqgtk2.so)
                #4  0x00007f0770f7f3ba n/a (libqgtk2.so)
                #5  0x00007f079ccae90d _ZN21QPlatformThemeFactory6createERK7QStringS2_ (libQt5Gui.so.5)
                #6  0x00007f079ccbc559 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5)
                #7  0x00007f079ccbcf8e _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5)
                #8  0x00007f079c16ddf5 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5)
                #9  0x00007f079ccbea70 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5)
                #10 0x00007f079d485d5a _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5)
                #11 0x0000563f77203f4b n/a (/home/parker/photosurface/photosurface)

Style plugin?

Does this plugin also acts as style plugin (e.g. QGtkStyle)? I.e. will Qt programs be able to use GTK 3.x CSS theme? I need a replacement for QGtkStyle with GTK3 themes support. Sure platform additions are great benefit (matching fonts, behavior etc)

Improve key mapping to fix menu shortcuts in more cases

The mapping of QKeySequence to gtk accel requires us to map Qt::Key to GDK_KEY_*. The reverse of the awful key mapping we did before.

Some keys have already been mapped, but there's a lot more to do. See qt_convertToGdkKeyval.

File dialog filter name with parentheses cut at wrong position

I am copying this report from FedoraQt/QGnomePlatform#35, since this seems to be the more active repo. I apologize if this is the wrong tracker (if so, I'd appreciate if you could point me to the right place).

In qgtk3dialoghelpers.cpp#L449, the filter name is stripped off as follows:
const QString name = filter.left(filter.indexOf(QLatin1Char('(')));

This blindly strips off all strings at parentheses, notwithstanding whether these parentheses are part of the name (as in "My File Format (Version 2)") or, as is the intended case, hold the suffixes. So "My File Format (Version 2) (*.mff)" is displayed as "My File Format" rather than "My File Format (Version 2)". This is a major usability problem with apps proposing multiple versions of a format to select from.

I suggest that you use the regexp from QPlatformFileDialogHelper instead, as in (untested):

QRegExp rx("^(.*)\\(([a-zA-Z0-9_.,*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$");

foreach (const QString &filter, filters) {
        GtkFileFilter *gtkFilter = gtk_file_filter_new();
        QString name = filter
        int i = rx.indexIn(filter);
        if (i >= 0)
            name = regexp.cap(1);
        const QStringList extensions = cleanFilterList(filter);

        gtk_file_filter_set_name(gtkFilter, name.isEmpty() ? extensions.join(QStringLiteral(", ")).toUtf8() : name.toUtf8());
        foreach (const QString &ext, extensions)
            gtk_file_filter_add_pattern(gtkFilter, ext.toUtf8());

        gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(gtkDialog), gtkFilter);

        _filters.insert(filter, gtkFilter);
        _filterNames.insert(gtkFilter, filter);
}

A simpler solution, but probably not as accurate, would be
const QString name = filter.left(filter.lastIndexOf(QLatin1Char('(')));

Can't build since 0.2.3

Relseases 0.2.3 and 0.2.4 fail to build with following error:

[    3s] + /usr/lib64/qt5/bin/qmake 'QMAKE_CFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_LFLAGS_DEBUG=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'QMAKE_LFLAGS_RELEASE=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' QMAKE_STRIP=
[    3s] Info: creating stash file /home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/.qmake.stash
[    3s] Info: creating cache file /home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/.qmake.cache
[    3s] + /usr/bin/make -O -j8
[    3s] cd src/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/src.pro 'QMAKE_CFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_LFLAGS_DEBUG=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'QMAKE_LFLAGS_RELEASE=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' QMAKE_STRIP= ) && /usr/bin/make -f Makefile 
[    3s] cd gtkextras/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras/gtkextras.pro 'QMAKE_CFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_LFLAGS_DEBUG=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'QMAKE_LFLAGS_RELEASE=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' QMAKE_STRIP= ) && /usr/bin/make -f Makefile 
[    3s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras'
[    3s] perl /usr/lib64/qt5/mkspecs/features/data/unix/findclasslist.pl < QtGtkExtras.version.in > QtGtkExtras.version
[    3s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras'
[    5s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras'
[    5s] g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -pthread -pthread -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_GTKEXTRAS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtGtkExtras -I/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/include/QtGtkExtras/5.9.0 -I/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/include/QtGtkExtras/5.9.0/QtGtkExtras -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/uuid -isystem /usr/include/harfbuzz -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/libdrm -isystem /usr/include/valgrind -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.10.1 -isystem /usr/include/qt5/QtGui/5.10.1/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore/5.10.1 -isystem /usr/include/qt5/QtCore/5.10.1/QtCore -isystem /usr/include/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/qgtkheaderbar.o qgtkheaderbar.cpp
[    5s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras'
[    5s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras'
[    5s] rm -f libQt5GtkExtras.so.5.9.0 libQt5GtkExtras.so libQt5GtkExtras.so.5 libQt5GtkExtras.so.5.9
[    5s] g++ -Wl,--no-undefined -Wl,--version-script,QtGtkExtras.version -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fuse-ld=gold -Wl,--enable-new-dtags -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5GtkExtras.so.5 -o libQt5GtkExtras.so.5.9.0 .obj/qgtkheaderbar.o  -lQt5Widgets -lQt5Gui -lQt5Core -lpthread -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lfribidi -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lGL 
[    5s] ln -s libQt5GtkExtras.so.5.9.0 libQt5GtkExtras.so
[    5s] ln -s libQt5GtkExtras.so.5.9.0 libQt5GtkExtras.so.5
[    5s] ln -s libQt5GtkExtras.so.5.9.0 libQt5GtkExtras.so.5.9
[    5s] rm -f ../../lib/libQt5GtkExtras.so.5.9.0
[    5s] mv -f libQt5GtkExtras.so.5.9.0  ../../lib/ 
[    5s] rm -f ../../lib/libQt5GtkExtras.so
[    5s] rm -f ../../lib/libQt5GtkExtras.so.5
[    5s] rm -f ../../lib/libQt5GtkExtras.so.5.9
[    5s] mv -f libQt5GtkExtras.so ../../lib/ 
[    5s] mv -f libQt5GtkExtras.so.5 ../../lib/ 
[    5s] mv -f libQt5GtkExtras.so.5.9 ../../lib/ 
[    5s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/gtkextras'
[    5s] cd platform-plugin/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/platform-plugin/platform-plugin.pro 'QMAKE_CFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_DEBUG=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_CXXFLAGS_RELEASE=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection ' 'QMAKE_LFLAGS_DEBUG=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'QMAKE_LFLAGS_RELEASE=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' QMAKE_STRIP= ) && /usr/bin/make -f Makefile 
[    5s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/platform-plugin'
[    5s] g++ -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -pthread -pthread -pthread -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -dM -E -o .moc/moc_predefs.h /usr/lib64/qt5/mkspecs/features/data/dummy.cpp
[    5s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/platform-plugin'
[    5s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/platform-plugin'
[    5s] g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -pthread -pthread -pthread -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_FOREACH -DDISABLE_TRACE_CODE -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_KEYWORDS -DQT_PLUGIN -DQT_GTKEXTRAS_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_GLX_SUPPORT_LIB -DQT_EGL_SUPPORT_LIB -DQT_SERVICE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/uuid -isystem /usr/include/harfbuzz -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/libdrm -isystem /usr/include/valgrind -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I../../include -I../../include/QtGtkExtras -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtFontDatabaseSupport -isystem /usr/include/qt5/QtFontDatabaseSupport/5.10.1 -isystem /usr/include/qt5/QtFontDatabaseSupport/5.10.1/QtFontDatabaseSupport -isystem /usr/include/qt5/QtGlxSupport -isystem /usr/include/qt5/QtGlxSupport/5.10.1 -isystem /usr/include/qt5/QtGlxSupport/5.10.1/QtGlxSupport -isystem /usr/include/qt5/QtEglSupport -isystem /usr/include/qt5/QtEglSupport/5.10.1 -isystem /usr/include/qt5/QtEglSupport/5.10.1/QtEglSupport -isystem /usr/include/qt5/QtServiceSupport -isystem /usr/include/qt5/QtServiceSupport/5.10.1 -isystem /usr/include/qt5/QtServiceSupport/5.10.1/QtServiceSupport -isystem /usr/include/qt5/QtThemeSupport -isystem /usr/include/qt5/QtThemeSupport/5.10.1 -isystem /usr/include/qt5/QtThemeSupport/5.10.1/QtThemeSupport -isystem /usr/include/qt5/QtGui/5.10.1 -isystem /usr/include/qt5/QtGui/5.10.1/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore/5.10.1 -isystem /usr/include/qt5/QtCore/5.10.1/QtCore -isystem /usr/include/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/qgtkwindow.o qgtkwindow.cpp
[    5s] In file included from qgtkwindow.cpp:27:
[    5s] qgtkwindow.h:30:10: fatal error: qgtkrefptr.h: No such file or directory
[    5s]  #include "qgtkrefptr.h"
[    5s]           ^~~~~~~~~~~~~~
[    5s] compilation terminated.
[    5s] make[2]: *** [Makefile:561: .obj/qgtkwindow.o] Error 1
[    5s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gtkplatform-0.2.4/src/platform-plugin'
[    5s] make[2]: *** Waiting for unfinished jobs....

Popup menus appear empty

Right click on e.g. ricochet shows an empty popup. Presumably something is going wrong with the items in m_model in QGtkMenu.

Investigate menu shortcuts not working

We have native menus, and map accels to them, but this doesn't seem to work right now. My guess is that events are being delivered to the content item, and eaten there.

Investigate using pango to do font rendering

It might be interesting to get even closer to "native" integration if font rendering was all done in one way. See if it's possible and what the tradeoffs are, measure performance.

Project ERROR: Could not find feature stack-protector-strong

I'm trying to build from the latest git master but make ends on the error Project ERROR: Could not find feature stack-protector-strong

OS: Solus (Linux)
Qt version: 5.9.1 (all possible Qt devel packages are installed AFAIK since I'm also compiling other Qt software)

Am I missing something?

PPSSPP is screwed up

The PPSSPP UI looks amazing :D The menu is in a separate window, not in the right place, and there's an extra empty window:

ppsspp-gtk

But at least it's not semi-transparent like wayland-egl is for some reason:

ppsspp-wegl

(FreeBSD 12-CURRENT, Weston, GTK 3.22.26, Qt 5.7.1, gtkplatform 0.2.1, PPSSPP-qt5 1.5.4.)

Experiment with faster ways of mirroring GL framebuffers

The GL framebuffer has to be vertically flipped before it's passed over to GTK. At the moment this is done with QImage::mirrored, but that's significantly impacting performance.

There are a couple ways to mirror the image on the GL side, which is probably much faster, at the cost of allocating a second framebuffer or texture. Client-side, perhaps cairo could do it during blit, but it's unclear if that would be much faster and it would have some challenges.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.