My program draws changes to a windows: void GOGUIPanelWidget::CopyToScreen(wxDC* mdc, const wxRect& rect) { wxClientDC dc(this); dc.Blit(rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight(), mdc, rect.GetX(), rect.GetY()); } Using x11 GTK3 backend this works. Using the wayland GTK3 backend, the screen is often not updated. Focusing another windows and similar things often (eg. using a second gdb window) yield to a screen update. Test system: Clean Fedora Workstation 25 QEMU installed including all updates released until today. Demo programm: https://software.opensuse.org/download.html?project=home%3Ae9925248%3Agrandorgue&package=grandorgue Compare clicking on the "Montre 8'" button using GDK_BACKEND=wayland and GDK_BACKEND=x11
Starting it inside of weston yields to the same result.
IIRC, you need to call Refresh() to flag a redraw of the widget on next loop. For some reason the XOrg backend seems to redraw every loop (I'm not sure if this is a bug or just a quirk the XOrg backend). Taking a quick look, here is the documentation for the wxWindow::Refresh() http://docs.wxwidgets.org/3.0/classwx_window.html#a29dc7251746154c821b17841b9877830
Assuming GOGUIPanelWidget inherits wxPanel, this should work: void GOGUIPanelWidget::CopyToScreen(wxDC* mdc, const wxRect& rect) { wxClientDC dc(this); dc.Blit(rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight(), mdc, rect.GetX(), rect.GetY()); Refresh(); } Here's an example I found quickly online: http://zetcode.com/gui/wxwidgets/thetetrisgame/ Refresh is called multiple times to request a new draw update.
Refresh is the normal windows update route. Refresh schedules a paint event and calls OnPaint, which redraws the whole window content via wxPaintDC. The code uses wxClientDC: http://docs.wxwidgets.org/trunk/classwx_client_d_c.html This class allows direct painting into the windows outside of the normal whole window refresh. This works for OS X, windows and X1, but breaks using GTK3 wayland. Calling Refresh() as you suggested would result in a double drawing: First wxClientDC would paint something - afterwards Refresh will schedule a whole window redraw. https://forums.wxwidgets.org/viewtopic.php?t=29909
wxClientDC, wxWindowDC and wxScreenDC are based on gdk_cairo_create. This function is already deprecated https://developer.gnome.org/gdk3/stable/gdk3-Cairo-Interaction.html#gdk-window-create-similar-surface and will be removed in future versions: https://git.gnome.org/browse/gtk+/commit/?id=d48adf9cee7e340acd7f8b9a5f9716695352b848 The reason seems to be wayland and its screen update handling - you should just draw during the painting event in the future. So wxWidgets will need some adaptions.
Caret wx sample also shows the bug: http://trac.wxwidgets.org/ticket/17820
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Personally, I have lost interest in this bug, so I won't reopen this bug. The bug is still unfixed upstream, so it affects current releases too.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '29'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.