When trying to create a glfw windows without using a client API (aka not creating an OpenGL context) then the window doesn't display.
#include <stdio.h>
#include <GLFW/glfw3.h>
int main()
{
if (glfwInit() != GLFW_TRUE) {
fprintf(stderr, "Couldn't initialize glfw\n");
return 1;
}
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
// if you comment out this line then it works just fine.
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
GLFWwindow *window = glfwCreateWindow(1280, 720, "sway test", NULL, NULL);
while (!glfwWindowShouldClose(window)) {
glfwPollEvents();
}
glfwTerminate();
return 0;
}
(compile with clang/gcc filename.c -lglfw)
Neither the wayland or the x11 build of glfw work.
Works on:
weston
plasma wayland
GNOME wayland
Doesn't work on:
sway
orbment
Both sway and orbment use wlc, so the problem might lie here somewhere.
When trying to create a glfw windows without using a client API (aka not creating an OpenGL context) then the window doesn't display.
(compile with
clang/gcc filename.c -lglfw
)Neither the wayland or the x11 build of glfw work.
Works on:
Doesn't work on:
Both sway and orbment use wlc, so the problem might lie here somewhere.