Skip to content

Commit

Permalink
Commented out some X11 stuff under Wayland.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Oct 25, 2023
1 parent 1fe6118 commit c24dc12
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
15 changes: 11 additions & 4 deletions mrv2/lib/mrvApp/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,18 @@ namespace mrv
set_root_path(argc, argv);

#ifdef __linux__
int ok = XInitThreads();
if (!ok)
throw std::runtime_error("XInitThreads failed");

XSetErrorHandler(xerrorhandler);
# ifdef FLTK_USE_X11
if (!fl_wl_display())
{
int ok = XInitThreads();
if (!ok)
throw std::runtime_error("XInitThreads failed");

XSetErrorHandler(xerrorhandler);
}
# endif

#endif
// Store the application object for further use down the line
App::app = this;
Expand Down
21 changes: 8 additions & 13 deletions mrv2/lib/mrvGL/mrvGLWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,11 @@ namespace mrv
return;

HWND hwnd = fl_win32_xid(this);
assert(hwnd);
HDC hdc = fl_GetDC(hwnd);
assert(hdc);
assert(hglrc);
wglMakeCurrent(hdc, hglrc);
# endif

# ifdef __linux__
# ifdef FLTK_USE_X11
auto dpy = fl_x11_display();
if (dpy)
{
auto win = fl_x11_xid(this);
assert(win);
glXMakeCurrent(dpy, win, (GLXContext)ctx);
}
# endif
# ifdef FLTK_USE_WAYLAND
auto wldpy = fl_wl_display();
if (wldpy)
Expand All @@ -74,12 +62,19 @@ namespace mrv
return;

auto win = fl_wl_xid(this);
assert(win);

auto surface = fl_wl_surface(win);
eglMakeCurrent(wldpy, surface, surface, eglctx);
}
# endif
# ifdef FLTK_USE_X11
auto dpy = fl_x11_display();
if (dpy)
{
auto win = fl_x11_xid(this);
glXMakeCurrent(dpy, win, (GLXContext)ctx);
}
# endif
# endif
}
#endif
Expand Down

0 comments on commit c24dc12

Please sign in to comment.