Fix regression in ea2a929f
, check for Wayland
Fix regression in ea2a929f
, which broke x11 support by not checking for
Wayland when making the Wayland EGL subsurface move call.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
873de5f667
commit
0bfb88d0e3
|
@ -2364,7 +2364,8 @@ void GLDrawingPanel::OnSize(wxSizeEvent& ev)
|
|||
AdjustViewport();
|
||||
|
||||
// Temporary hack to backport 800d6ed69b from wxWidgets until 3.2.2 is released.
|
||||
MoveWaylandSubsurface(this);
|
||||
if (IsWayland())
|
||||
MoveWaylandSubsurface(this);
|
||||
|
||||
ev.Skip();
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@ bool IsWayland() { return GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default()); }
|
|||
|
||||
void MoveWaylandSubsurface(wxGLCanvas* win)
|
||||
{
|
||||
if (!IsWayland()) return;
|
||||
|
||||
int x, y;
|
||||
gdk_window_get_origin(win->GTKGetDrawingWindow(), &x, &y);
|
||||
wl_subsurface_set_position(win->m_wlSubsurface, x, y);
|
||||
|
|
Loading…
Reference in New Issue