You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<assert.h>
#include<stdio.h>
#include"glad/gl.h"
#include<GLFW/glfw3.h>voiderror_callback(int code, constchar* description)
{
printf("[E] [glfw] (code=%d) %s\n", code, description);
}
intmain()
{
GLFWwindow* window = NULL;
glfwSetErrorCallback(error_callback);
/* Initialize the library */if (!glfwInit())
return -1;
//glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
if (!gladLoadGL((GLADloadfunc)glfwGetProcAddress))
{
printf("[E] [glad] gladLoadGL failed\n");
return -1;
}
printf("[I] [gl]\n Vendor: %s\n Renderer: %s\n Version: %s\n",
glGetString(GL_VENDOR), glGetString(GL_RENDERER), glGetString(GL_VERSION));
glfwShowWindow(window);
/* Loop until the user closes the window */int tick = 0;
while (!glfwWindowShouldClose(window))
{
/* Poll for and process events */glfwPollEvents();
//printf("[I] update: %d\n", tick);
tick += 1;
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapInterval(1);
glfwSwapBuffers(window);
}
glfwDestroyWindow(window);
glfwTerminate();
return0;
}
ScreenShot:
Wayland Global:
[I] [wayland] global wl_compositor (v5)
[I] [wayland] global wl_drm (v2)
[I] [wayland] global wl_shm (v1)
[I] [wayland] global wl_output (v2)
[I] [wayland] global zxdg_output_manager_v1 (v3)
[I] [wayland] global wl_data_device_manager (v3)
[I] [wayland] global zwp_primary_selection_device_manager_v1 (v1)
[I] [wayland] global gtk_primary_selection_device_manager (v1)
[I] [wayland] global wl_subcompositor (v1)
[I] [wayland] global xdg_wm_base (v4)
[I] [wayland] global zxdg_shell_v6 (v1)
[I] [wayland] global gtk_shell1 (v5)
[I] [wayland] global wp_viewporter (v1)
[I] [wayland] global zwp_pointer_gestures_v1 (v3)
[I] [wayland] global zwp_tablet_manager_v2 (v1)
[I] [wayland] global wl_seat (v5)
[I] [wayland] global zwp_relative_pointer_manager_v1 (v1)
[I] [wayland] global zwp_pointer_constraints_v1 (v1)
[I] [wayland] global zxdg_exporter_v1 (v1)
[I] [wayland] global zxdg_importer_v1 (v1)
[I] [wayland] global zwp_linux_dmabuf_v1 (v4)
[I] [wayland] global zwp_keyboard_shortcuts_inhibit_manager_v1 (v1)
[I] [wayland] global zwp_text_input_manager_v3 (v1)
[I] [wayland] global wp_presentation (v1)
[I] [wayland] global xdg_activation_v1 (v1)
The text was updated successfully, but these errors were encountered:
Yes. Libdecor is the solution for decorations in Wayland. The library is lightweight and uses native decorations on GNOME, plasma and wlroots based compositors. It uses either xdg-decoration protocol if available or draw the decoration if required.
elmindreda
changed the title
[Wayland] Missing XDG decoration results in missing window system controls
Missing XDG decoration results in missing window system controls
Jan 31, 2024
System:
Code
ScreenShot:
Wayland Global:
The text was updated successfully, but these errors were encountered: