mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-04 13:29:45 -05:00
Comment out currently failing build definitions
This gets wlroots to build, but the transitive closure of files depending on wlr_surface.c is actually pretty large. As more interfaces are changed to use the new compositor design, their build definitions will be uncommented. This also includes a very basic test client/server, but this will be removed later.
This commit is contained in:
parent
1160a83903
commit
21db2418b7
5 changed files with 159 additions and 62 deletions
15
meson.build
15
meson.build
|
|
@ -98,17 +98,17 @@ endif
|
||||||
subdir('protocol')
|
subdir('protocol')
|
||||||
subdir('render')
|
subdir('render')
|
||||||
|
|
||||||
subdir('backend')
|
#subdir('backend')
|
||||||
subdir('types')
|
subdir('types')
|
||||||
subdir('util')
|
subdir('util')
|
||||||
subdir('xcursor')
|
subdir('xcursor')
|
||||||
subdir('xwayland')
|
#subdir('xwayland')
|
||||||
|
|
||||||
subdir('include')
|
subdir('include')
|
||||||
|
|
||||||
wlr_parts += [
|
wlr_parts += [
|
||||||
lib_wl_protos,
|
lib_wl_protos,
|
||||||
lib_wlr_backend,
|
#lib_wlr_backend,
|
||||||
lib_wlr_render,
|
lib_wlr_render,
|
||||||
lib_wlr_types,
|
lib_wlr_types,
|
||||||
lib_wlr_util,
|
lib_wlr_util,
|
||||||
|
|
@ -168,8 +168,13 @@ summary = [
|
||||||
]
|
]
|
||||||
message('\n'.join(summary))
|
message('\n'.join(summary))
|
||||||
|
|
||||||
subdir('examples')
|
executable('test-server', 'test-server.c',
|
||||||
subdir('rootston')
|
dependencies: wlroots)
|
||||||
|
executable('test-client', 'test-client.c',
|
||||||
|
dependencies: wayland_client)
|
||||||
|
|
||||||
|
#subdir('examples')
|
||||||
|
#subdir('rootston')
|
||||||
|
|
||||||
pkgconfig = import('pkgconfig')
|
pkgconfig = import('pkgconfig')
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
|
|
|
||||||
62
test-client.c
Normal file
62
test-client.c
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <wayland-client.h>
|
||||||
|
|
||||||
|
struct wl_compositor *compositor;
|
||||||
|
struct wl_subcompositor *subcompositor;
|
||||||
|
|
||||||
|
static void global(void *data, struct wl_registry *reg, uint32_t name,
|
||||||
|
const char *interface, uint32_t version)
|
||||||
|
{
|
||||||
|
if (strcmp(interface, wl_compositor_interface.name) == 0) {
|
||||||
|
compositor = wl_registry_bind(reg, name, &wl_compositor_interface, 4);
|
||||||
|
} else if (strcmp(interface, wl_subcompositor_interface.name) == 0) {
|
||||||
|
subcompositor = wl_registry_bind(reg, name, &wl_subcompositor_interface, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void global_remove(void *data, struct wl_registry *reg, uint32_t name)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct wl_registry_listener registry_listener = {
|
||||||
|
.global = global,
|
||||||
|
.global_remove = global_remove,
|
||||||
|
};
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
struct wl_display *display = wl_display_connect("test");
|
||||||
|
|
||||||
|
struct wl_registry *registry = wl_display_get_registry(display);
|
||||||
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
|
struct wl_surface *parent = wl_compositor_create_surface(compositor);
|
||||||
|
|
||||||
|
struct wl_surface *surface = wl_compositor_create_surface(compositor);
|
||||||
|
struct wl_subsurface *subsurface =
|
||||||
|
wl_subcompositor_get_subsurface(subcompositor, surface, parent);
|
||||||
|
|
||||||
|
wl_surface_damage(parent, 0, 0, 100, 100);
|
||||||
|
wl_surface_commit(parent);
|
||||||
|
|
||||||
|
wl_subsurface_set_position(subsurface, -100, -100);
|
||||||
|
wl_surface_set_buffer_transform(parent, WL_OUTPUT_TRANSFORM_90);
|
||||||
|
wl_surface_commit(parent);
|
||||||
|
|
||||||
|
wl_subsurface_set_position(subsurface, 100, 100);
|
||||||
|
wl_surface_commit(parent);
|
||||||
|
|
||||||
|
while (wl_display_dispatch(display) != -1);
|
||||||
|
|
||||||
|
const struct wl_interface *iface = NULL;
|
||||||
|
uint32_t error = 0;
|
||||||
|
wl_display_get_protocol_error(display, &iface, &error);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
printf("%u %s\n", error, iface->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
wl_display_disconnect(display);
|
||||||
|
}
|
||||||
29
test-server.c
Normal file
29
test-server.c
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#include <signal.h>
|
||||||
|
#include <wayland-server.h>
|
||||||
|
|
||||||
|
#include <wlr/types/wlr_compositor.h>
|
||||||
|
#include <wlr/types/wlr_subcompositor.h>
|
||||||
|
|
||||||
|
struct wl_display *display;
|
||||||
|
|
||||||
|
static void sigint(int signo)
|
||||||
|
{
|
||||||
|
wl_display_terminate(display);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
display = wl_display_create();
|
||||||
|
wl_display_add_socket(display, "test");
|
||||||
|
|
||||||
|
signal(SIGINT, sigint);
|
||||||
|
|
||||||
|
struct wlr_compositor *comp = wlr_compositor_create(display, NULL);
|
||||||
|
struct wlr_subcompositor *subcomp = wlr_subcompositor_create(comp);
|
||||||
|
|
||||||
|
(void)subcomp;
|
||||||
|
wl_display_run(display);
|
||||||
|
|
||||||
|
wl_display_destroy_clients(display);
|
||||||
|
wl_display_destroy(display);
|
||||||
|
}
|
||||||
|
|
@ -1,73 +1,74 @@
|
||||||
lib_wlr_types = static_library(
|
lib_wlr_types = static_library(
|
||||||
'wlr_types',
|
'wlr_types',
|
||||||
files(
|
files(
|
||||||
'data_device/wlr_data_device.c',
|
#'data_device/wlr_data_device.c',
|
||||||
'data_device/wlr_data_offer.c',
|
#'data_device/wlr_data_offer.c',
|
||||||
'data_device/wlr_data_source.c',
|
#'data_device/wlr_data_source.c',
|
||||||
'data_device/wlr_drag.c',
|
#'data_device/wlr_drag.c',
|
||||||
'seat/wlr_seat_keyboard.c',
|
#'seat/wlr_seat_keyboard.c',
|
||||||
'seat/wlr_seat_pointer.c',
|
#'seat/wlr_seat_pointer.c',
|
||||||
'seat/wlr_seat_touch.c',
|
#'seat/wlr_seat_touch.c',
|
||||||
'seat/wlr_seat.c',
|
#'seat/wlr_seat.c',
|
||||||
'tablet_v2/wlr_tablet_v2_pad.c',
|
#'tablet_v2/wlr_tablet_v2_pad.c',
|
||||||
'tablet_v2/wlr_tablet_v2_tablet.c',
|
#'tablet_v2/wlr_tablet_v2_tablet.c',
|
||||||
'tablet_v2/wlr_tablet_v2_tool.c',
|
#'tablet_v2/wlr_tablet_v2_tool.c',
|
||||||
'tablet_v2/wlr_tablet_v2.c',
|
#'tablet_v2/wlr_tablet_v2.c',
|
||||||
'xdg_shell_v6/wlr_xdg_popup_v6.c',
|
#'xdg_shell_v6/wlr_xdg_popup_v6.c',
|
||||||
'xdg_shell_v6/wlr_xdg_positioner_v6.c',
|
#'xdg_shell_v6/wlr_xdg_positioner_v6.c',
|
||||||
'xdg_shell_v6/wlr_xdg_shell_v6.c',
|
#'xdg_shell_v6/wlr_xdg_shell_v6.c',
|
||||||
'xdg_shell_v6/wlr_xdg_surface_v6.c',
|
#'xdg_shell_v6/wlr_xdg_surface_v6.c',
|
||||||
'xdg_shell_v6/wlr_xdg_toplevel_v6.c',
|
#'xdg_shell_v6/wlr_xdg_toplevel_v6.c',
|
||||||
'xdg_shell/wlr_xdg_popup.c',
|
#'xdg_shell/wlr_xdg_popup.c',
|
||||||
'xdg_shell/wlr_xdg_positioner.c',
|
#'xdg_shell/wlr_xdg_positioner.c',
|
||||||
'xdg_shell/wlr_xdg_shell.c',
|
#'xdg_shell/wlr_xdg_shell.c',
|
||||||
'xdg_shell/wlr_xdg_surface.c',
|
#'xdg_shell/wlr_xdg_surface.c',
|
||||||
'xdg_shell/wlr_xdg_toplevel.c',
|
#'xdg_shell/wlr_xdg_toplevel.c',
|
||||||
'wlr_box.c',
|
'wlr_box.c',
|
||||||
'wlr_buffer.c',
|
'wlr_buffer.c',
|
||||||
'wlr_compositor.c',
|
'wlr_compositor.c',
|
||||||
'wlr_cursor.c',
|
'wlr_subcompositor.c',
|
||||||
'wlr_data_control_v1.c',
|
#'wlr_cursor.c',
|
||||||
'wlr_export_dmabuf_v1.c',
|
#'wlr_data_control_v1.c',
|
||||||
'wlr_foreign_toplevel_management_v1.c',
|
#'wlr_export_dmabuf_v1.c',
|
||||||
'wlr_fullscreen_shell_v1.c',
|
#'wlr_foreign_toplevel_management_v1.c',
|
||||||
'wlr_gamma_control_v1.c',
|
#'wlr_fullscreen_shell_v1.c',
|
||||||
'wlr_gamma_control.c',
|
#'wlr_gamma_control_v1.c',
|
||||||
'wlr_gtk_primary_selection.c',
|
#'wlr_gamma_control.c',
|
||||||
'wlr_idle_inhibit_v1.c',
|
#'wlr_gtk_primary_selection.c',
|
||||||
'wlr_idle.c',
|
#'wlr_idle_inhibit_v1.c',
|
||||||
'wlr_input_device.c',
|
#'wlr_idle.c',
|
||||||
'wlr_input_inhibitor.c',
|
#'wlr_input_device.c',
|
||||||
'wlr_input_method_v2.c',
|
#'wlr_input_inhibitor.c',
|
||||||
|
#'wlr_input_method_v2.c',
|
||||||
'wlr_keyboard.c',
|
'wlr_keyboard.c',
|
||||||
'wlr_layer_shell_v1.c',
|
#'wlr_layer_shell_v1.c',
|
||||||
'wlr_linux_dmabuf_v1.c',
|
'wlr_linux_dmabuf_v1.c',
|
||||||
'wlr_list.c',
|
'wlr_list.c',
|
||||||
'wlr_matrix.c',
|
'wlr_matrix.c',
|
||||||
'wlr_output_damage.c',
|
#'wlr_output_damage.c',
|
||||||
'wlr_output_layout.c',
|
#'wlr_output_layout.c',
|
||||||
'wlr_output_management_v1.c',
|
'wlr_output_management_v1.c',
|
||||||
'wlr_output.c',
|
#'wlr_output.c',
|
||||||
'wlr_pointer_constraints_v1.c',
|
#'wlr_pointer_constraints_v1.c',
|
||||||
'wlr_pointer_gestures_v1.c',
|
#'wlr_pointer_gestures_v1.c',
|
||||||
'wlr_pointer.c',
|
'wlr_pointer.c',
|
||||||
'wlr_presentation_time.c',
|
#'wlr_presentation_time.c',
|
||||||
'wlr_primary_selection_v1.c',
|
#'wlr_primary_selection_v1.c',
|
||||||
'wlr_primary_selection.c',
|
#'wlr_primary_selection.c',
|
||||||
'wlr_relative_pointer_v1.c',
|
#'wlr_relative_pointer_v1.c',
|
||||||
'wlr_screencopy_v1.c',
|
#'wlr_screencopy_v1.c',
|
||||||
'wlr_screenshooter.c',
|
#'wlr_screenshooter.c',
|
||||||
'wlr_server_decoration.c',
|
#'wlr_server_decoration.c',
|
||||||
'wlr_surface.c',
|
#'wlr_surface.c',
|
||||||
'wlr_switch.c',
|
'wlr_switch.c',
|
||||||
'wlr_tablet_pad.c',
|
'wlr_tablet_pad.c',
|
||||||
'wlr_tablet_tool.c',
|
#'wlr_tablet_tool.c',
|
||||||
'wlr_text_input_v3.c',
|
#'wlr_text_input_v3.c',
|
||||||
'wlr_touch.c',
|
'wlr_touch.c',
|
||||||
'wlr_virtual_keyboard_v1.c',
|
#'wlr_virtual_keyboard_v1.c',
|
||||||
'wlr_xcursor_manager.c',
|
#'wlr_xcursor_manager.c',
|
||||||
'wlr_xdg_decoration_v1.c',
|
#'wlr_xdg_decoration_v1.c',
|
||||||
'wlr_xdg_output_v1.c',
|
#'wlr_xdg_output_v1.c',
|
||||||
),
|
),
|
||||||
include_directories: wlr_inc,
|
include_directories: wlr_inc,
|
||||||
dependencies: [
|
dependencies: [
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ static void subsurface_destroy(struct wl_client *client, struct wl_resource *res
|
||||||
|
|
||||||
static void subsurface_set_position(struct wl_client *client,
|
static void subsurface_set_position(struct wl_client *client,
|
||||||
struct wl_resource *res, int32_t x, int32_t y) {
|
struct wl_resource *res, int32_t x, int32_t y) {
|
||||||
struct wlr_subsurface *ss = subsurface_from_resource(res);
|
//struct wlr_subsurface *ss = subsurface_from_resource(res);
|
||||||
struct wlr_commit *commit = wlr_surface_get_pending(ss->parent);
|
//struct wlr_commit *commit = wlr_surface_get_pending(ss->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void subsurface_place_above(struct wl_client *client,
|
static void subsurface_place_above(struct wl_client *client,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue