From 859af074adce88ccfa272b605f9f9f9da9320ffb Mon Sep 17 00:00:00 2001 From: Window Maker Date: Tue, 2 Jun 2026 20:23:26 +0200 Subject: [PATCH] cleanup: remove stale Phase planning comments from all wayland backend files --- src/backend/wayland/wl_backend.c | 244 ++++------------------- src/backend/wayland/wl_badge.c | 1 - src/backend/wayland/wl_client.c | 2 - src/backend/wayland/wl_clipboard.c | 1 - src/backend/wayland/wl_context.c | 3 - src/backend/wayland/wl_dnd.c | 3 - src/backend/wayland/wl_dock.c | 4 - src/backend/wayland/wl_events.c | 3 - src/backend/wayland/wl_extensions.c | 1 - src/backend/wayland/wl_fakeleader.c | 1 - src/backend/wayland/wl_focus.c | 3 - src/backend/wayland/wl_framebuf.c | 2 - src/backend/wayland/wl_grabs.c | 1 - src/backend/wayland/wl_grabstate.c | 2 - src/backend/wayland/wl_handlers.c | 4 - src/backend/wayland/wl_icccm.c | 3 - src/backend/wayland/wl_keyboard.c | 3 - src/backend/wayland/wl_layer_shell.c | 4 - src/backend/wayland/wl_output.c | 3 - src/backend/wayland/wl_output_mgmt.c | 1 - src/backend/wayland/wl_overlay.c | 3 - src/backend/wayland/wl_pointer_focus.c | 11 - src/backend/wayland/wl_pointer_motion.c | 6 - src/backend/wayland/wl_popup.c | 1 - src/backend/wayland/wl_props.c | 7 - src/backend/wayland/wl_screen.c | 1 - src/backend/wayland/wl_shm.c | 3 - src/backend/wayland/wl_signalfd.c | 3 - src/backend/wayland/wl_stubs.c | 3 - src/backend/wayland/wl_text_input.c | 1 - src/backend/wayland/wl_virtual_pointer.c | 1 - src/backend/wayland/wl_window.c | 4 - src/backend/wayland/wl_wings.c | 3 - src/backend/wayland/wl_xdg.c | 11 +- src/backend/wayland/wl_xdg_activation.c | 2 - src/backend/wayland/wl_xkb.c | 2 - src/backend/wayland/wl_xwayland.c | 3 - 37 files changed, 44 insertions(+), 310 deletions(-) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index dede843..b1ad596 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -1,103 +1,6 @@ /* * wl_backend.c -- wlroots-based Wayland compositor backend for Window Maker - * - * Phase 31: complete stub vtable. Every slot compiles and returns a safe - * zero/null/false value. Subsequent phases will replace stubs with real - * wlroots implementations one functional area at a time. - * Phase 32: display_open/close/screen_count implemented with wlroots headless - * backend. - * Phase 34: Wayland compositor socket created (clients can connect); - * wlr_output_layout added; monitors_query returns real head geometry. - * Phase 35: Core Wayland protocol globals advertised (wl_compositor, - * wl_subcompositor, wl_seat, wl_data_device_manager, xdg_wm_base). - * Phase 36: wl_shm and wl_output advertised; XDG toplevel listener wired. - * Phase 37: frame callbacks driven by output frame event; XDG configure - * sent on new toplevel so clients complete their first frame. - * Phase 38: per-toplevel view struct with map/unmap/destroy lifecycle; - * synthetic Window IDs; context_save/find/delete implemented. - * Phase 39: handle_toplevel_map wires XDG toplevel map to wManageWindow so - * Wayland surfaces appear in scr->focused_window list. - * Phase 40: handle_toplevel_unmap wires XDG toplevel unmap to wUnmanageWindow. - * Phase 41: prop_get_wm_class and window_fetch_name return XDG app_id/title. - * Phase 42: window_get_client_attrs returns WCLIENT_VIEWABLE + surface - * geometry for mapped XDG toplevels. - * Phase 43: focus_set delivers keyboard focus via wlr_seat; headless keyboard - * device created and attached to seat; mapped toplevels auto-focused. - * Phase 44: client_synth_configure, window_resize send XDG configure events - * so clients receive size changes from the WM. - * Phase 45: pointer_query returns 1 (always on-screen); wWindowFocus/Unfocus - * guarded on frame!=NULL so wSetFocusTo works without a frame window. - * Phase 46: client_close vtable slot (wlr_xdg_toplevel_send_close); - * title_listener updates wwin->wm_instance/wm_class on set_title signal; - * wClientSendProtocol/wClientKill guarded for Wayland. - * Phase 47: prop_get_normal_hints returns XDG toplevel min/max/current size. - * Phase 53: headless pointer device added to seat; seat advertises both - * WL_SEAT_CAPABILITY_KEYBOARD and WL_SEAT_CAPABILITY_POINTER. - * Phase 54: virtual pointer position tracking; pointer_warp/warp_to update - * state; pointer_query/query_full return tracked coordinates. - * Phase 55: window_get_rect returns real geometry for synthetic toplevel IDs; - * window_move records WM-assigned x,y in the view struct. - * Phase 56: prop_set/get_wm_state persist WM state (workspace, miniaturized, - * shaded, etc.) in the view struct so wWindowGetSavedState works correctly. - * Phase 57: icccm_set/get/free_command store WM_COMMAND in the view struct; - * misc.c getCommandForWindow uses the vtable on the Wayland path. - * Phase 58: stacking_raise/lower/restack manipulate toplevel_list Z-order; - * stacking_query enumerates IDs in order (returns 1 to suppress warning). - * Phase 62: wl_screen_create_internals creates a real off-screen InputOnly X - * window (no_focus_xwin) as the focus sink and sets scr->no_focus_win to it. - * wl_focus_set recognises WNATIVE_NONE or no_focus_xwin as "clear focus" and - * calls wlr_seat_keyboard_clear_focus instead of activating an XWayland surface. - * Phase 63: PropGetProtocols sets DELETE_WINDOW=1 for all Wayland windows - * (all XDG toplevels support close); wClientSendProtocol dispatches - * client_close in the Wayland path so MC_CLOSE is enabled and kill_close=0. - * wManageWindow succeeded log now includes kill_close= field. - * Phase 64: zxdg_decoration_manager_v1 advertised; new_toplevel_decoration - * listener responds immediately with CLIENT_SIDE mode so clients draw their - * own title bars (no X11 frame rendering in the Wayland path). - * Phase 65: prop_get_transient_for implemented — walks xdg_toplevel->parent - * chain and returns the synthetic Window ID of the parent view so - * dialog windows are correctly identified as transients by the policy layer. - * Phase 66: XDG popup initial configure — schedule configure for - * WLR_XDG_SURFACE_ROLE_POPUP so context menus and autocomplete dropdowns - * can commit their first buffer without stalling on the compositor. - * Phase 17: XWayland support — wlr_xwayland started alongside the headless - * backend; X11 windows (e.g. GNUstep apps) appear via new_surface events, - * receive synthetic Window IDs equal to their xcb_window_t, and - * are managed through the same wl_toplevel_view / wManageWindow lifecycle - * as XDG toplevels. DISPLAY env var is set so X11 clients can connect. - * Phase 37: zwlr_data_control_manager_v1, zwlr_input_inhibitor_v1, - * zwlr_virtual_pointer_manager_v1, org_kde_kwin_idle, zxdg_exporter/importer_v2 - * advertised. Input inhibitor activate/deactivate wired. - * Phase 36: zwlr_layer_shell_v1 advertised; new_surface handler creates a - * wl_layer_view, assigns output, computes anchor/margin geometry, sends - * configure, and positions the scene node. Map/unmap/destroy wired. - * Phase 35: zwlr_foreign_toplevel_management_v1 advertised; handle created - * on map, destroyed on unmap, with title/app_id/output/activated state set. - * xdg_activation_v1 advertised; request_activate delivers WM focus + raise. - * Phase 34: zwp_text_input_manager_v3, zwp_input_method_manager_v2, and - * zwp_virtual_keyboard_manager_v1 advertised for IME / on-screen keyboard. - * Phase 33: zwlr_output_management_v1, zwlr_output_power_management_v1, - * zwlr_gamma_control_manager_v1, and wp_presentation advertised. - * Output management apply/test requests acknowledged (single-output no-op). - * Output power set_mode applies DPMS on/off via wlr_output_enable/commit. - * Phase 32: zwp_linux_dmabuf_v1, zwlr_screencopy_manager_v1, and - * zwlr_export_dmabuf_manager_v1 advertised as passive globals so GPU - * zero-copy buffers, screenshot tools, and screen recorders work. - * Phase 18: nested Wayland compositor + wlr_scene rendering. - * If WMAKER_WAYLAND_NESTED=1 is set, a wlr_wl_backend is used alongside the - * headless backend (via wlr_multi_backend) so the compositor appears as a - * Wayland window on the host desktop. wlr_scene provides a scene graph for - * compositing client surfaces; wlr_scene_output_commit renders each frame. - * A per-view scene node is created for each XDG/XWayland surface and kept - * in sync with the WM-assigned position. - * Phase 20: real input device forwarding for nested mode. - * handle_backend_new_input wires listeners for the host compositor's real - * pointer/keyboard devices so key presses and mouse motion are forwarded to - * focused Wayland clients. A grey wlr_scene_rect root background is added - * so the compositor output shows a proper desktop instead of solid black. - * Pointer bounds clamping updated to use actual output dimensions. */ - #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -134,57 +37,56 @@ #include #include "wmaker-popup-v1-server-protocol.h" #include -#include /* Phase 17: XWayland support */ +#include #include /* X_SetInputFocus and other request codes */ -#include /* Phase 18: nested Wayland backend */ -#include /* Phase 18: multi-backend */ -#include /* Phase 18: scene graph compositing */ -#include /* Phase 18: buffer allocator */ -#include /* Phase 29+: WM-owned SHM surface buffers */ +#include +#include +#include +#include +#include #include /* wlr_buffer_init/wlr_buffer_impl */ -#include /* Phase 29+: DRM_FORMAT_ARGB8888 */ -#include /* Phase 29+: software pixel rendering */ -#include /* Phase 23: hardware cursor tracking */ -#include /* Phase 23: xcursor theme */ -#include /* Phase 25: clipboard / selection */ -#include /* Phase 26: primary selection (middle-click) */ -#include /* Phase 26: zwp_primary_selection_device_manager_v1 */ -#include /* Phase 27: xdg-output for panel geometry */ -#include /* Phase 28: idle inhibit for video/fullscreen */ -#include /* Phase 29: wp_viewporter for video scaling */ -#include /* Phase 30: relative pointer for games */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Generated protocol header required by wlr_pointer_constraints_v1.h */ #include "protocols/pointer-constraints-unstable-v1-protocol.h" -#include /* Phase 30: pointer lock for games */ -#include /* Phase 31: shortcut inhibit for games */ -#include /* Phase 32: zwp_linux_dmabuf_v1 for GPU zero-copy */ -#include /* Phase 32: zwlr_screencopy_manager_v1 for screenshots */ -#include /* Phase 32: zwlr_export_dmabuf_manager_v1 for screen recorders */ -#include /* Phase 33: zwlr_output_management_v1 (randr equivalent) */ +#include +#include +#include +#include +#include +#include /* Generated protocol header required by wlr_output_power_management_v1.h */ #include "protocols/wlr-output-power-management-unstable-v1-protocol.h" -#include /* Phase 33: zwlr_output_power_management_v1 (DPMS) */ -#include /* Phase 33: zwlr_gamma_control_manager_v1 (Night Light) */ -#include /* Phase 33: wp_presentation (smooth frame timing) */ -#include /* Phase 34: zwp_text_input_manager_v3 (IME client) */ -#include /* Phase 34: zwp_input_method_manager_v2 (IME server) */ -#include /* Phase 34: zwp_virtual_keyboard_manager_v1 */ -#include /* Phase 35: zwlr_foreign_toplevel_management_v1 */ -#include /* Phase 35: xdg_activation_v1 (focus tokens) */ +#include +#include +#include +#include +#include +#include +#include +#include /* Generated protocol header required by wlr_layer_shell_v1.h */ #include "protocols/wlr-layer-shell-unstable-v1-protocol.h" -#include /* Phase 36: zwlr_layer_shell_v1 (panels, docks) */ -#include /* Phase 37: zwlr_data_control_manager_v1 (clipboard mgr) */ -#include /* Phase 37: zwlr_virtual_pointer_manager_v1 (remote desktop) */ +#include +#include +#include /* wlr_input_inhibitor and wlr_idle (org_kde_kwin_idle) were removed in * wlroots 0.18 — use wlr_session_lock_v1 / wlr_idle_notify_v1 instead. */ -#include /* Phase 37: xdg-foreign registry (shared state) */ -#include /* Phase 37: zxdg_exporter_v2 / zxdg_importer_v2 */ +#include +#include #include /* Generated xdg-shell protocol implementation (Wayland glue code) */ #include "protocols/xdg-shell-protocol.c" #include -/* Phase 77: XKB for keysym→keycode translation and modifier mask setup */ #include #include "../../WindowMaker.h" @@ -193,12 +95,12 @@ #include "../../framewin.h" /* WFrameWindow for frame_paint */ #include "../../texture.h" /* WTexture, wTextureRenderImage */ #include "../../misc.h" /* ShrinkString */ -#include "../../actions.h" /* Phase 16: wMaximizeWindow, wIconifyWindow, etc. */ -#include "../../stacking.h" /* Phase 24: wRaiseFrame for click-to-raise */ -#include "../../xinerama.h" /* Phase 16: wGetHeadForWindow */ -#include "../../xmodifier.h" /* Phase 77: wSetModifierMasks */ -#include "../../event.h" /* Phase 78: wWaylandKeyPress */ -#include "../x11/wmspec.h" /* Phase 30+: get_window_image_from_x11 */ +#include "../../actions.h" +#include "../../stacking.h" +#include "../../xinerama.h" +#include "../../xmodifier.h" +#include "../../event.h" +#include "../x11/wmspec.h" #include "../../icon.h" /* WIcon, TILE_* */ #include "../../workspace.h" /* WWorkspace */ #include "../../dock.h" /* WDock (for clip->collapsed) */ @@ -214,7 +116,6 @@ /* ------------------------------------------------------------------ */ /* WINGs private header — needed for W_EventBackend, W_Screen fields */ #include -/* ------------------------------------------------------------------ */ #include #include "../../def_pixmaps.h" struct W_Screen; @@ -229,7 +130,6 @@ void W_UnregisterBacking(unsigned long id); /* ------------------------------------------------------------------ */ /* Forward declarations */ -/* ------------------------------------------------------------------ */ #include "wl_types.h" extern void wm_dock_app_add(struct wl_toplevel_view *v); @@ -242,9 +142,6 @@ int level_to_bucket(int level); struct wlr_scene_tree *level_tree_for(int level); struct wl_frame_buf *frame_buf_find(WNativeWindow id); -/* ------------------------------------------------------------------ */ -/* Phase 36 / 37 / 38: XDG surface lifecycle, frame loop, view mgmt */ -/* ------------------------------------------------------------------ */ /* * Phase 37: Wayland event loop timer — drives client frame callbacks. @@ -286,28 +183,19 @@ frame_timer_cb(void *data) /* X error handler — defined near the vtable at the bottom of this file. */ int wl_catch_xwayland_error(Display *edpy, XErrorEvent *error); -/* Phase 43: forward declaration — defined in the focus section below. */ void wl_focus_set(WNativeWindow win, int revert_to, unsigned long timestamp); -/* Phase 50: forward declaration — defined in client section below. */ int wl_client_get_pid(WNativeWindow win); -/* Phase 13: forward declarations — defined in pointer section below. */ void wl_update_pointer_focus(uint32_t time_msec); void wl_pointer_warp_to(int x, int y); /* wmaker-popup-v1 helper — defined in protocol section below. */ void wmaker_popup_apply(struct wl_toplevel_view *view); extern void wmaker_popup_manager_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id); -/* Phase 14: pointer event handler forward declarations. */ extern void handle_pointer_motion(struct wl_listener *listener, void *data); -/* Phase 24: click-to-focus helper — defined in Phase 13 pointer section. */ extern struct wlr_surface *view_surface_at(int px, int py, double *sx_out, double *sy_out, struct wl_toplevel_view **view_out); -/* Phase 24: client cursor-surface request handler. */ extern void handle_seat_request_cursor(struct wl_listener *listener, void *data); -/* Phase 25: client clipboard selection request handler. */ static void handle_seat_request_set_selection(struct wl_listener *listener, void *data); -/* Phase 25b: drag-and-drop request handler. */ void handle_seat_request_start_drag(struct wl_listener *listener, void *data); -/* Phase 26: primary selection request handler. */ static void handle_seat_request_primary_selection(struct wl_listener *listener, void *data); /* Compositor-internal clipboard hooks for WINGs. */ void wl_clipboard_store_to_seat(const char *text, int len); @@ -318,38 +206,26 @@ void wl_drag_icon_show(struct W_View *view, int x, int y); void wl_drag_icon_move(int x, int y); void wl_drag_icon_hide(void); void wl_drag_cursor_feedback(Bool accepted); -/* Phase 28: idle inhibitor created/destroyed handler. */ static void handle_idle_new_inhibitor(struct wl_listener *listener, void *data); -/* Phase 29: scroll-wheel axis event handler. */ extern void handle_pointer_axis(struct wl_listener *listener, void *data); -/* Phase 30: new pointer constraint handler. */ static void handle_new_pointer_constraint(struct wl_listener *listener, void *data); -/* Phase 31: new keyboard shortcuts inhibitor handler. */ static void handle_new_shortcuts_inhibitor(struct wl_listener *listener, void *data); -/* Phase 33: output management apply/test + output power set_mode handlers. */ extern void handle_output_mgr_apply(struct wl_listener *listener, void *data); extern void handle_output_mgr_test(struct wl_listener *listener, void *data); extern void handle_output_power_set_mode(struct wl_listener *listener, void *data); -/* Phase 34: text input, input method, virtual keyboard new-instance handlers. */ extern void handle_text_input_new(struct wl_listener *listener, void *data); extern void handle_input_method_new(struct wl_listener *listener, void *data); extern void handle_virtual_keyboard_new(struct wl_listener *listener, void *data); -/* Phase 35: xdg_activation request_activate handler. */ extern void handle_xdg_activation_request(struct wl_listener *listener, void *data); -/* Phase 36: layer shell new_surface handler. */ static void handle_layer_shell_new_surface(struct wl_listener *listener, void *data); extern void handle_xdg_new_toplevel(struct wl_listener *listener, void *data); extern void handle_new_toplevel_decoration(struct wl_listener *listener, void *data); -/* Phase 37: virtual pointer handler. */ extern void handle_virtual_pointer_new(struct wl_listener *listener, void *data); -/* Phase 17: XWayland new surface forward declaration. */ extern void handle_xwayland_new_surface(struct wl_listener *listener, void *data); extern void handle_xwayland_ready(struct wl_listener *listener, void *data); extern void handle_xwayland_server_destroy(struct wl_listener *listener, void *data); extern void wm_dock_create(WScreen *scr); -/* Phase 20: nested backend real input device forward declaration. */ extern void handle_backend_new_input(struct wl_listener *listener, void *data); -/* Phase 18: output lifecycle and frame rendering forward declarations. */ extern void handle_backend_new_output(struct wl_listener *listener, void *data); extern void handle_output_frame(struct wl_listener *listener, void *data); extern void handle_pointer_motion_absolute(struct wl_listener *listener, void *data); @@ -365,11 +241,7 @@ extern const char *resize_edges_to_cursor(uint32_t edges); -/* ------------------------------------------------------------------ */ -/* ------------------------------------------------------------------ */ -/* Display lifecycle (Phase 32 / Phase 34) */ -/* ------------------------------------------------------------------ */ /* Startup pump thread: keeps the Wayland event loop running while the main * thread initialises WINGs/RContext during StartUp(). XWayland needs the @@ -682,7 +554,6 @@ wl_display_open(const char *name) if (!wl_state.is_nested) wlr_headless_add_output(wl_state.headless_inner, 1920, 1080); - /* Phase 34: create the UNIX socket so Wayland clients can connect. */ sock = wl_display_add_socket_auto(wl_state.display); if (!sock) { wwarning("wl_backend: failed to create Wayland compositor socket"); @@ -700,7 +571,6 @@ wl_display_open(const char *name) wl_state.socket_name, getenv("DISPLAY") ? getenv("DISPLAY") : "(unset)"); - /* Phase 35: advertise core Wayland protocol globals. */ wl_state.compositor = wlr_compositor_create(wl_state.display, 6, wl_state.renderer); wlr_subcompositor_create(wl_state.display); @@ -708,7 +578,6 @@ wl_display_open(const char *name) wl_state.data_device_mgr = wlr_data_device_manager_create(wl_state.display); - /* Phase 24: handle client cursor-surface requests on the seat. */ if (wl_state.seat) { wl_state.seat_request_cursor_listener.notify = handle_seat_request_cursor; wl_signal_add(&wl_state.seat->events.request_set_cursor, @@ -772,7 +641,6 @@ wl_display_open(const char *name) else wwarning("wl_backend: wp_viewporter unavailable"); - /* Phase 30: relative pointer + pointer constraints for games / pointer lock. */ wl_state.relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(wl_state.display); if (wl_state.relative_pointer_mgr) @@ -883,7 +751,6 @@ wl_display_open(const char *name) wwarning("wl_backend: xdg-activation created (xdg_activation_v1)"); } - /* Phase 36: layer shell — panels, docks, wallpapers, lock screens. */ wl_state.layer_shell = wlr_layer_shell_v1_create(wl_state.display, 4); if (wl_state.layer_shell) { wl_state.layer_shell_new_surface_listener.notify = @@ -946,7 +813,6 @@ wl_display_open(const char *name) wwarning("wl_backend: xdg-decoration-manager created"); } - /* Phase 36: advertise wl_shm (needed by SHM buffer clients). */ wlr_renderer_init_wl_shm(wl_state.renderer, wl_state.display); /* wl_output global is created in handle_backend_new_output. */ @@ -986,7 +852,6 @@ wl_display_open(const char *name) wlr_seat_set_capabilities(wl_state.seat, WL_SEAT_CAPABILITY_KEYBOARD | WL_SEAT_CAPABILITY_POINTER); - /* Phase 38: initialise per-toplevel tracking and context store. */ wl_list_init(&wl_state.toplevel_list); wl_list_init(&wl_state.or_list); wl_list_init(&wl_state.frame_list); @@ -999,7 +864,6 @@ wl_display_open(const char *name) wl_state.next_synthetic_id = 0x10000000UL; wl_state.managed_surface_count = 0; - /* Phase 36: listen for new XDG toplevels (wlroots 0.19+). */ wl_state.xdg_new_surface_listener.notify = handle_xdg_new_toplevel; wl_signal_add(&wl_state.xdg_shell->events.new_toplevel, &wl_state.xdg_new_surface_listener); @@ -1055,7 +919,6 @@ wl_display_open(const char *name) wl_event_source_timer_update(wl_state.frame_timer, 16); } - /* Phase 54: initialise virtual pointer at screen centre. */ wl_state.pointer_x = 960; wl_state.pointer_y = 540; wwarning("wl_backend: virtual pointer initialised at %d,%d", @@ -1271,42 +1134,31 @@ wl_display_close(void) WL_LISTENER_REMOVE(wl_state.pointer_motion_abs_listener); WL_LISTENER_REMOVE(wl_state.pointer_button_listener); WL_LISTENER_REMOVE(wl_state.pointer_frame_listener); - /* Phase 20: backend new_input listener and real device listeners */ WL_LISTENER_REMOVE(wl_state.backend_new_input_listener); WL_LISTENER_REMOVE(wl_state.real_keyboard_key_listener); WL_LISTENER_REMOVE(wl_state.real_keyboard_modifiers_listener); WL_LISTENER_REMOVE(wl_state.real_pointer_motion_abs_listener); WL_LISTENER_REMOVE(wl_state.real_pointer_button_listener); WL_LISTENER_REMOVE(wl_state.real_pointer_frame_listener); - /* Phase 24/25: seat cursor + selection listeners */ WL_LISTENER_REMOVE(wl_state.seat_request_cursor_listener); WL_LISTENER_REMOVE(wl_state.seat_request_set_selection_listener); - /* Phase 26/28: primary selection + idle inhibitor listeners */ WL_LISTENER_REMOVE(wl_state.seat_request_primary_selection_listener); WL_LISTENER_REMOVE(wl_state.idle_new_inhibitor_listener); - /* Phase 29: axis listeners */ WL_LISTENER_REMOVE(wl_state.pointer_axis_listener); WL_LISTENER_REMOVE(wl_state.real_pointer_axis_listener); - /* Phase 30/31: pointer constraints + shortcuts inhibitor listeners */ WL_LISTENER_REMOVE(wl_state.new_constraint_listener); WL_LISTENER_REMOVE(wl_state.new_shortcuts_inhibitor_listener); - /* Phase 33: output management + output power listeners */ WL_LISTENER_REMOVE(wl_state.output_mgr_apply_listener); WL_LISTENER_REMOVE(wl_state.output_mgr_test_listener); WL_LISTENER_REMOVE(wl_state.output_power_set_mode_listener); - /* Phase 34: text input, input method, virtual keyboard listeners */ WL_LISTENER_REMOVE(wl_state.text_input_new_listener); WL_LISTENER_REMOVE(wl_state.input_method_new_listener); WL_LISTENER_REMOVE(wl_state.virtual_keyboard_new_listener); - /* Phase 35: xdg_activation listener */ WL_LISTENER_REMOVE(wl_state.xdg_activation_request_listener); - /* Phase 36: layer shell new_surface listener */ WL_LISTENER_REMOVE(wl_state.layer_shell_new_surface_listener); - /* Phase 37: virtual pointer listener */ WL_LISTENER_REMOVE(wl_state.virtual_pointer_new_listener); #undef WL_LISTENER_REMOVE - /* Phase 23: destroy cursor and xcursor manager before display teardown. */ if (wl_state.xcursor_mgr) { wlr_xcursor_manager_destroy(wl_state.xcursor_mgr); wl_state.xcursor_mgr = NULL; @@ -1581,12 +1433,10 @@ wl_event_loop_terminate(void) } } -/* ================================================================== */ /* ------------------------------------------------------------------ */ /* Drag icon overlay for WINGs compositor-internal DND */ -/* ------------------------------------------------------------------ */ @@ -1681,12 +1531,7 @@ handle_new_shortcuts_inhibitor(struct wl_listener *listener, void *data) wwarning("wl_backend: keyboard shortcuts inhibitor activated"); } -/* ------------------------------------------------------------------ */ -/* ------------------------------------------------------------------ */ -/* ------------------------------------------------------------------ */ -/* Phase 36: layer shell — panels, docks, wallpapers, overlays */ -/* ------------------------------------------------------------------ */ #define LAYER_VIEW_FROM(l, field) \ ((struct wl_layer_view *)((char *)(l) - offsetof(struct wl_layer_view, field))) @@ -1871,7 +1716,6 @@ handle_layer_shell_new_surface(struct wl_listener *listener, void *data) ls->namespace ? ls->namespace : ""); } -/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */ /* Keyboard grabs */ @@ -1881,7 +1725,6 @@ handle_layer_shell_new_surface(struct wl_listener *listener, void *data) /* ------------------------------------------------------------------ */ /* Screen internals */ -/* ------------------------------------------------------------------ */ int wl_screen_select_input(WScreen *scr, long mask) { (void)scr; (void)mask; return 1; } void wl_screen_set_root_cursor(WScreen *scr, int cursor_id) { (void)scr; (void)cursor_id; } @@ -2410,7 +2253,6 @@ static int parse_color_to_rcolor(WScreen *scr, const char *name, RColor *out) if (wl_state.output) wlr_output_schedule_frame(wl_state.output); } -/* ------------------------------------------------------------------ */ void wl_monitors_query(WScreen *scr, WHeadGeometry **heads_out, int *count_out) @@ -2423,7 +2265,6 @@ wl_monitors_query(WScreen *scr, WHeadGeometry **heads_out, int *count_out) return; } - /* Phase 34: return the single headless output as head 0. */ WHeadGeometry *heads = wmalloc(sizeof(WHeadGeometry)); if (wl_state.output_layout) { @@ -2454,4 +2295,3 @@ wl_monitors_query(WScreen *scr, WHeadGeometry **heads_out, int *count_out) -/* ------------------------------------------------------------------ */ diff --git a/src/backend/wayland/wl_badge.c b/src/backend/wayland/wl_badge.c index a39ab47..ee73877 100644 --- a/src/backend/wayland/wl_badge.c +++ b/src/backend/wayland/wl_badge.c @@ -16,7 +16,6 @@ extern void W_UnregisterBacking(unsigned long id); /* ------------------------------------------------------------------ */ /* Workspace badge */ -/* ------------------------------------------------------------------ */ RImage * wl_workspace_badge_render(WScreen *scr, WNativeWindow badge_win, diff --git a/src/backend/wayland/wl_client.c b/src/backend/wayland/wl_client.c index 9557808..2e60303 100644 --- a/src/backend/wayland/wl_client.c +++ b/src/backend/wayland/wl_client.c @@ -22,7 +22,6 @@ struct wl_toplevel_view *wl_find_view_by_id(WNativeWindow id); /* ------------------------------------------------------------------ */ /* Client */ -/* ------------------------------------------------------------------ */ int wl_window_get_client_attrs(WNativeWindow win, WClientAttributes *out) @@ -414,7 +413,6 @@ int wl_client_get_pid(WNativeWindow win) { struct wl_toplevel_view *v = wl_find_view_by_id(win); if (!v) return 0; - /* Phase 17: XWayland surfaces have a direct pid field. */ if (v->xw_surface) return (int)v->xw_surface->pid; if (!v->xdg_surface || !v->xdg_surface->resource) diff --git a/src/backend/wayland/wl_clipboard.c b/src/backend/wayland/wl_clipboard.c index 49f398d..c8ed03b 100644 --- a/src/backend/wayland/wl_clipboard.c +++ b/src/backend/wayland/wl_clipboard.c @@ -11,7 +11,6 @@ /* ------------------------------------------------------------------ */ /* Compositor-internal clipboard (WINGs ↔ Wayland clients) */ -/* ------------------------------------------------------------------ */ char *wl_seat_clipboard_text = NULL; int wl_seat_clipboard_len = 0; diff --git a/src/backend/wayland/wl_context.c b/src/backend/wayland/wl_context.c index bae7285..9917a71 100644 --- a/src/backend/wayland/wl_context.c +++ b/src/backend/wayland/wl_context.c @@ -9,9 +9,6 @@ #include "wl_types.h" -/* ------------------------------------------------------------------ */ -/* Context (window → object lookup table) — Phase 38 */ -/* ------------------------------------------------------------------ */ void wl_context_save(WNativeWindow win, WContextKey key, void *data) diff --git a/src/backend/wayland/wl_dnd.c b/src/backend/wayland/wl_dnd.c index b581b03..678f3e4 100644 --- a/src/backend/wayland/wl_dnd.c +++ b/src/backend/wayland/wl_dnd.c @@ -10,9 +10,6 @@ #include "wl_types.h" #include -/* ------------------------------------------------------------------ */ -/* Phase 25b: DND request_start_drag — external client starts a drag */ -/* ------------------------------------------------------------------ */ /* Currently active external wlr_drag (NULL if none). */ struct wlr_drag *wl_current_drag = NULL; diff --git a/src/backend/wayland/wl_dock.c b/src/backend/wayland/wl_dock.c index 7e87aad..bc92d76 100644 --- a/src/backend/wayland/wl_dock.c +++ b/src/backend/wayland/wl_dock.c @@ -18,7 +18,6 @@ struct wm_shm_surface *wm_shm_surface_create(int width, int height); void wm_shm_surface_fill(struct wm_shm_surface *s, int x, int y, int w, int h, uint32_t color); void wm_shm_surface_commit(struct wm_shm_surface *s, struct wlr_scene_tree *parent, int x, int y); -/* Phase 30: WM dock panel (layer-anchored, pixman-rendered) */ /* ================================================================== */ /* @@ -148,9 +147,6 @@ wm_dock_create(WScreen *scr) sw - dw, dw, sh, n_slots); } -/* ------------------------------------------------------------------ */ -/* Phase 30+: dock icon management */ -/* ------------------------------------------------------------------ */ /* * wm_shm_surface_repaint — after updating the pixman pixel data, diff --git a/src/backend/wayland/wl_events.c b/src/backend/wayland/wl_events.c index e5640e5..35beb37 100644 --- a/src/backend/wayland/wl_events.c +++ b/src/backend/wayland/wl_events.c @@ -5,9 +5,7 @@ /* ------------------------------------------------------------------ */ /* Events */ -/* ------------------------------------------------------------------ */ -/* ------------------------------------------------------------------ */ Bool wl_noop_screen_get_head_usable_area(WScreen *scr, int head, int *x1, int *y1, int *x2, int *y2) @@ -18,7 +16,6 @@ wl_noop_screen_get_head_usable_area(WScreen *scr, int head, } /* WNativeWindow map / unmap / geometry */ -/* ------------------------------------------------------------------ */ diff --git a/src/backend/wayland/wl_extensions.c b/src/backend/wayland/wl_extensions.c index 889a740..02e7958 100644 --- a/src/backend/wayland/wl_extensions.c +++ b/src/backend/wayland/wl_extensions.c @@ -14,7 +14,6 @@ /* ------------------------------------------------------------------ */ /* Extensions / cursors / error handlers */ -/* ------------------------------------------------------------------ */ void wl_extensions_init(void) {} void wl_cursors_init(void) {} diff --git a/src/backend/wayland/wl_fakeleader.c b/src/backend/wayland/wl_fakeleader.c index d1a0305..78d7b88 100644 --- a/src/backend/wayland/wl_fakeleader.c +++ b/src/backend/wayland/wl_fakeleader.c @@ -11,7 +11,6 @@ /* ------------------------------------------------------------------ */ /* Fake leader */ -/* ------------------------------------------------------------------ */ WNativeWindow wl_fake_leader_create(WScreen *scr) { diff --git a/src/backend/wayland/wl_focus.c b/src/backend/wayland/wl_focus.c index 5efa6f9..7a09c93 100644 --- a/src/backend/wayland/wl_focus.c +++ b/src/backend/wayland/wl_focus.c @@ -14,12 +14,10 @@ struct wl_toplevel_view *wl_find_view_by_id(WNativeWindow id); /* ------------------------------------------------------------------ */ /* Focus */ -/* ------------------------------------------------------------------ */ void wl_focus_set(WNativeWindow win, int revert_to, unsigned long timestamp) { - /* Phase 43/62: deliver keyboard focus to the XDG toplevel, or clear it. */ (void)revert_to; (void)timestamp; if (!wl_state.seat || !wl_state.keyboard_dev) return; @@ -34,7 +32,6 @@ wl_focus_set(WNativeWindow win, int revert_to, unsigned long timestamp) } struct wl_toplevel_view *v = wl_find_view_by_id(win); if (!v) return; - /* Phase 17: XWayland windows need both X11 focus and Wayland seat focus. */ if (v->xw_surface) { wlr_xwayland_surface_activate(v->xw_surface, true); if (v->xw_surface->surface) { diff --git a/src/backend/wayland/wl_framebuf.c b/src/backend/wayland/wl_framebuf.c index d52ee77..9a94557 100644 --- a/src/backend/wayland/wl_framebuf.c +++ b/src/backend/wayland/wl_framebuf.c @@ -25,7 +25,6 @@ extern void *W_RegisterBacking(unsigned long id, void *img); extern void W_UnregisterBacking(unsigned long id); extern void *W_GetViewBacking(unsigned long id); -/* ------------------------------------------------------------------ */ void frame_buf_destroy(struct wlr_buffer *wlr_buf) { @@ -270,7 +269,6 @@ frame_buf_hit(int px, int py) /* ------------------------------------------------------------------ */ /* Frame / window lifecycle */ -/* ------------------------------------------------------------------ */ WNativeWindow wl_frame_create_toplevel(WScreen *scr, diff --git a/src/backend/wayland/wl_grabs.c b/src/backend/wayland/wl_grabs.c index 0e85078..c55558f 100644 --- a/src/backend/wayland/wl_grabs.c +++ b/src/backend/wayland/wl_grabs.c @@ -5,7 +5,6 @@ /* ------------------------------------------------------------------ */ /* Key / button grabs */ -/* ------------------------------------------------------------------ */ void wl_key_grab(WNativeWindow win, unsigned int keycode, diff --git a/src/backend/wayland/wl_grabstate.c b/src/backend/wayland/wl_grabstate.c index 7188225..e71c504 100644 --- a/src/backend/wayland/wl_grabstate.c +++ b/src/backend/wayland/wl_grabstate.c @@ -13,7 +13,6 @@ void wl_set_cursor_image(const char *name); /* ------------------------------------------------------------------ */ /* Pointer grabs */ -/* ------------------------------------------------------------------ */ int wl_pointer_grab(WNativeWindow grab_win, WNativeWindow confine_to, @@ -61,7 +60,6 @@ wl_pointer_grab(WNativeWindow grab_win, WNativeWindow confine_to, wl_set_cursor_image("left_ptr"); } } -/* ------------------------------------------------------------------ */ int wl_keyboard_grab(WNativeWindow win) diff --git a/src/backend/wayland/wl_handlers.c b/src/backend/wayland/wl_handlers.c index 35d6a8c..3136751 100644 --- a/src/backend/wayland/wl_handlers.c +++ b/src/backend/wayland/wl_handlers.c @@ -129,8 +129,6 @@ handle_new_shortcuts_inhibitor(struct wl_listener *listener, void *data) wwarning("wl_backend: keyboard shortcuts inhibitor activated"); } -/* ------------------------------------------------------------------ */ -/* ------------------------------------------------------------------ */ void handle_pointer_button(struct wl_listener *listener, void *data) @@ -195,7 +193,6 @@ handle_pointer_button(struct wl_listener *listener, void *data) } } - /* Phase A: enqueue native WMEvent for WINGs */ WMScreen *wmscr = wl_get_wmscreen(); if (wmscr) { WMEvent wev; @@ -293,6 +290,5 @@ handle_pointer_frame(struct wl_listener *listener, void *data) /* ------------------------------------------------------------------ */ /* Screen internals */ -/* ------------------------------------------------------------------ */ int wl_screen_replace_wm(WScreen *scr) { (void)scr; return 1; } diff --git a/src/backend/wayland/wl_icccm.c b/src/backend/wayland/wl_icccm.c index e319302..c6636ab 100644 --- a/src/backend/wayland/wl_icccm.c +++ b/src/backend/wayland/wl_icccm.c @@ -10,7 +10,6 @@ struct wl_toplevel_view *wl_find_view_by_id(WNativeWindow id); /* ------------------------------------------------------------------ */ /* ICCCM */ -/* ------------------------------------------------------------------ */ void wl_icccm_set_wm_hints(WNativeWindow win, const WWMHints *hints) { (void)win; (void)hints; } void wl_icccm_set_class_hint(WNativeWindow win, const char *wm_class, const char *wm_instance) { (void)win; (void)wm_class; (void)wm_instance; } @@ -18,7 +17,6 @@ void wl_icccm_set_class_hint_if_absent(WNativeWindow win, const char *wm_class, void wl_icccm_set_command(WNativeWindow win, char **argv, int argc) { - /* Phase 57: store WM_COMMAND in the view struct. */ struct wl_toplevel_view *v = wl_find_view_by_id(win); int i; if (!v || !argv || argc <= 0) return; @@ -53,7 +51,6 @@ wl_icccm_get_command(WNativeWindow win, char ***argv_out, int *argc_out) void wl_icccm_free_command(char **argv) { - /* Phase 57: free NULL-terminated argv returned by wl_icccm_get_command. */ int i; if (!argv) return; for (i = 0; argv[i] != NULL; i++) wfree(argv[i]); diff --git a/src/backend/wayland/wl_keyboard.c b/src/backend/wayland/wl_keyboard.c index 8435ea0..7f00f03 100644 --- a/src/backend/wayland/wl_keyboard.c +++ b/src/backend/wayland/wl_keyboard.c @@ -19,9 +19,6 @@ int wWaylandKeyPress(unsigned int keycode, unsigned int modifiers); WMScreen *wl_get_wmscreen(void); void W_WL_EnqueueEvent(struct W_Screen *scr, const WMEvent *ev, struct W_View *target); -/* ------------------------------------------------------------------ */ -/* Phase 78: keyboard event handlers */ -/* ------------------------------------------------------------------ */ void handle_keyboard_key(struct wl_listener *listener, void *data) diff --git a/src/backend/wayland/wl_layer_shell.c b/src/backend/wayland/wl_layer_shell.c index c8a309e..e0131ac 100644 --- a/src/backend/wayland/wl_layer_shell.c +++ b/src/backend/wayland/wl_layer_shell.c @@ -10,9 +10,6 @@ #include #include "wl_types.h" -/* ------------------------------------------------------------------ */ -/* Phase 36: layer shell — panels, docks, wallpapers, overlays */ -/* ------------------------------------------------------------------ */ #define LAYER_VIEW_FROM(l, field) \ ((struct wl_layer_view *)((char *)(l) - offsetof(struct wl_layer_view, field))) @@ -197,4 +194,3 @@ handle_layer_shell_new_surface(struct wl_listener *listener, void *data) ls->namespace ? ls->namespace : ""); } -/* ------------------------------------------------------------------ */ diff --git a/src/backend/wayland/wl_output.c b/src/backend/wayland/wl_output.c index 2ac350a..d1cebd3 100644 --- a/src/backend/wayland/wl_output.c +++ b/src/backend/wayland/wl_output.c @@ -13,9 +13,6 @@ #include #include "wl_types.h" -/* ------------------------------------------------------------------ */ -/* Phase 18: output frame rendering and backend new-output handler */ -/* ------------------------------------------------------------------ */ void handle_output_frame(struct wl_listener *listener, void *data) diff --git a/src/backend/wayland/wl_output_mgmt.c b/src/backend/wayland/wl_output_mgmt.c index 852f6a5..38dae40 100644 --- a/src/backend/wayland/wl_output_mgmt.c +++ b/src/backend/wayland/wl_output_mgmt.c @@ -8,7 +8,6 @@ #include #include "wl_types.h" -/* Phase 33: output management, output power, gamma control */ /* ------------------------------------------------------------------ */ /* diff --git a/src/backend/wayland/wl_overlay.c b/src/backend/wayland/wl_overlay.c index 1586362..e54b694 100644 --- a/src/backend/wayland/wl_overlay.c +++ b/src/backend/wayland/wl_overlay.c @@ -21,7 +21,6 @@ void wm_shm_surface_fill(struct wm_shm_surface *s, int x, int y, int w, int h, uint32_t argb); /* ------------------------------------------------------------------ */ -/* Phase 81: Overlay animation surface — XOR pixel engine + bitmap */ /* font for geometry display (miniaturize zoom, transparent */ /* move/resize frames, position/size readouts). */ /* ------------------------------------------------------------------ */ @@ -272,7 +271,6 @@ overlay_flush(void) /* ------------------------------------------------------------------ */ /* Server grab */ -/* ------------------------------------------------------------------ */ void wl_server_grab(void) {} /* no-op: Wayland double-buffers for us */ void wl_server_ungrab(void) @@ -288,7 +286,6 @@ void wl_server_ungrab(void) /* ------------------------------------------------------------------ */ /* Overlays */ -/* ------------------------------------------------------------------ */ void wl_overlay_draw_line(WScreen *scr, int x1, int y1, int x2, int y2) diff --git a/src/backend/wayland/wl_pointer_focus.c b/src/backend/wayland/wl_pointer_focus.c index 53a2906..f327d95 100644 --- a/src/backend/wayland/wl_pointer_focus.c +++ b/src/backend/wayland/wl_pointer_focus.c @@ -18,9 +18,6 @@ /* Forward declarations for functions defined in other wl_*.c files */ void wl_set_cursor_image(const char *name); -/* ------------------------------------------------------------------ */ -/* Phase 13: pointer focus delivery to Wayland surfaces */ -/* ------------------------------------------------------------------ */ /* * Find the topmost mapped view whose surface contains screen point (px, py). @@ -170,7 +167,6 @@ wl_update_pointer_focus(uint32_t time_msec) void wl_pointer_warp(int dx, int dy) { - /* Phase 54: relative warp — clamp to output bounds. */ int ow = wl_state.output ? (int)wl_state.output->width : 1920; int oh = wl_state.output ? (int)wl_state.output->height : 1080; wl_state.pointer_x += dx; @@ -179,18 +175,15 @@ wl_pointer_warp(int dx, int dy) if (wl_state.pointer_y < 0) wl_state.pointer_y = 0; if (wl_state.pointer_x >= ow) wl_state.pointer_x = ow - 1; if (wl_state.pointer_y >= oh) wl_state.pointer_y = oh - 1; - /* Phase 23: update hardware cursor position. */ if (wl_state.cursor) wlr_cursor_warp(wl_state.cursor, NULL, (double)wl_state.pointer_x, (double)wl_state.pointer_y); - /* Phase 13: update pointer focus after relative warp */ wl_update_pointer_focus(0); } void wl_pointer_warp_to(int x, int y) { - /* Phase 54: absolute warp — clamp to output bounds. */ int ow = wl_state.output ? (int)wl_state.output->width : 1920; int oh = wl_state.output ? (int)wl_state.output->height : 1080; if (x < 0) x = 0; @@ -199,17 +192,14 @@ wl_pointer_warp_to(int x, int y) if (y >= oh) y = oh - 1; wl_state.pointer_x = x; wl_state.pointer_y = y; - /* Phase 23: update hardware cursor position. */ if (wl_state.cursor) wlr_cursor_warp(wl_state.cursor, NULL, (double)x, (double)y); - /* Phase 13: update pointer focus after absolute warp */ wl_update_pointer_focus(0); } int wl_pointer_query(WNativeWindow root, int *root_x, int *root_y) { - /* Phase 54: return tracked virtual pointer position. */ (void)root; *root_x = wl_state.pointer_x; *root_y = wl_state.pointer_y; @@ -222,7 +212,6 @@ wl_pointer_query_full(WNativeWindow root, int *root_x, int *root_y, unsigned int *buttons_out) { - /* Phase 54: return tracked virtual pointer position. */ (void)root; if (child_out) *child_out = WNATIVE_NONE; if (root_x) *root_x = wl_state.pointer_x; diff --git a/src/backend/wayland/wl_pointer_motion.c b/src/backend/wayland/wl_pointer_motion.c index d3a01ed..0c8030c 100644 --- a/src/backend/wayland/wl_pointer_motion.c +++ b/src/backend/wayland/wl_pointer_motion.c @@ -17,9 +17,6 @@ void wl_grab_apply_motion(void); void wl_update_pointer_focus(uint32_t time_msec); WMScreen *wl_get_wmscreen(void); -/* ------------------------------------------------------------------ */ -/* Phase 14: pointer input event handlers */ -/* ------------------------------------------------------------------ */ void handle_pointer_motion(struct wl_listener *listener, void *data) @@ -34,7 +31,6 @@ handle_pointer_motion(struct wl_listener *listener, void *data) if (wl_state.pointer_y < 0) wl_state.pointer_y = 0; if (wl_state.pointer_x >= ow) wl_state.pointer_x = ow - 1; if (wl_state.pointer_y >= oh) wl_state.pointer_y = oh - 1; - /* Phase 23: update hardware cursor position. */ if (wl_state.cursor) wlr_cursor_warp(wl_state.cursor, NULL, (double)wl_state.pointer_x, (double)wl_state.pointer_y); @@ -120,7 +116,6 @@ handle_pointer_motion(struct wl_listener *listener, void *data) wl_state.last_hovered_id = new_id; } } - /* Phase 22: apply grab before updating normal pointer focus. */ if (wl_state.grab_type) { wl_grab_apply_motion(); return; } wl_update_pointer_focus(ev->time_msec); } @@ -202,7 +197,6 @@ handle_pointer_motion_absolute(struct wl_listener *listener, void *data) wl_state.last_hovered_id = new_id; } } - /* Phase 22: apply grab before updating normal pointer focus. */ if (wl_state.grab_type) { wl_grab_apply_motion(); return; } wl_update_pointer_focus(ev->time_msec); } diff --git a/src/backend/wayland/wl_popup.c b/src/backend/wayland/wl_popup.c index 144580b..c1fd307 100644 --- a/src/backend/wayland/wl_popup.c +++ b/src/backend/wayland/wl_popup.c @@ -17,7 +17,6 @@ struct wl_frame_buf *frame_buf_find(WNativeWindow id); /* ------------------------------------------------------------------ */ /* wmaker-popup-v1 protocol — client-driven popup positioning */ -/* ------------------------------------------------------------------ */ static void wmaker_popup_handle_destroy(struct wl_client *client, diff --git a/src/backend/wayland/wl_props.c b/src/backend/wayland/wl_props.c index f5061e9..16079c8 100644 --- a/src/backend/wayland/wl_props.c +++ b/src/backend/wayland/wl_props.c @@ -15,7 +15,6 @@ struct wl_toplevel_view *wl_find_view_by_id(WNativeWindow id); struct wl_toplevel_view *wl_find_view_by_xdg_surface(struct wlr_xdg_surface *surf); /* Properties */ -/* ------------------------------------------------------------------ */ int wl_prop_get_normal_hints(WNativeWindow win, WNormalHints *out, int *pre_icccm) @@ -27,7 +26,6 @@ wl_prop_get_normal_hints(WNativeWindow win, WNormalHints *out, int *pre_icccm) *pre_icccm = 0; if (!v) return 0; - /* Phase 17: XWayland size_hints path. */ if (v->xw_surface) { xcb_size_hints_t *sh = v->xw_surface->size_hints; if (sh) { @@ -84,7 +82,6 @@ int wl_prop_get_wm_class(WNativeWindow win, char **wm_class, char **wm_instance) { - /* Phase 41: use XDG app_id / Phase 17: use XWayland WM_CLASS. */ struct wl_toplevel_view *v = wl_find_view_by_id(win); if (v && v->xw_surface) { *wm_class = strdup(v->xw_surface->class ? v->xw_surface->class : "x11-client"); @@ -122,7 +119,6 @@ wl_prop_get_transient_for(WNativeWindow win) * (a wlr_xdg_surface *). We walk the view list to find its ID. */ struct wl_toplevel_view *v = wl_find_view_by_id(win); if (!v) return WNATIVE_NONE; - /* Phase 17: XWayland transient_for via parent window_id. */ if (v->xw_surface) { struct wlr_xwayland_surface *parent = v->xw_surface->parent; if (!parent) return WNATIVE_NONE; @@ -145,7 +141,6 @@ int wl_prop_has_gtk_object_path(WNativeWindow win) { (void)win; return 0; } void wl_prop_set_wm_state(WNativeWindow win, const long *data, int n) { - /* Phase 56: store WM state in the view struct for later retrieval. */ struct wl_toplevel_view *v = wl_find_view_by_id(win); if (!v || !data || n <= 0) return; if (v->wm_state) wfree(v->wm_state); @@ -157,7 +152,6 @@ wl_prop_set_wm_state(WNativeWindow win, const long *data, int n) int wl_prop_get_wm_state(WNativeWindow win, long **data_out) { - /* Phase 56: return a heap copy of the stored WM state (caller frees). */ struct wl_toplevel_view *v = wl_find_view_by_id(win); if (!v || !v->wm_state) { *data_out = NULL; return 0; } *data_out = wmalloc((size_t)v->wm_state_n * sizeof(long)); @@ -165,5 +159,4 @@ wl_prop_get_wm_state(WNativeWindow win, long **data_out) return v->wm_state_n; } -/* ------------------------------------------------------------------ */ diff --git a/src/backend/wayland/wl_screen.c b/src/backend/wayland/wl_screen.c index 4a36791..b1cdede 100644 --- a/src/backend/wayland/wl_screen.c +++ b/src/backend/wayland/wl_screen.c @@ -12,7 +12,6 @@ /* ------------------------------------------------------------------ */ /* Screen open/close */ -/* ------------------------------------------------------------------ */ void wl_screen_open(WScreen *scr) diff --git a/src/backend/wayland/wl_shm.c b/src/backend/wayland/wl_shm.c index 547aa16..78c980d 100644 --- a/src/backend/wayland/wl_shm.c +++ b/src/backend/wayland/wl_shm.c @@ -11,9 +11,6 @@ #include #include "wl_types.h" -/* ================================================================== */ -/* Phase 29: WM-owned SHM surfaces (pixman rendering → wlroots scene) */ -/* ================================================================== */ /* * wm_shm_surface — a compositor-owned pixel buffer that plugs into the diff --git a/src/backend/wayland/wl_signalfd.c b/src/backend/wayland/wl_signalfd.c index 26fa3d4..a69dd16 100644 --- a/src/backend/wayland/wl_signalfd.c +++ b/src/backend/wayland/wl_signalfd.c @@ -20,9 +20,6 @@ void wDefaultsCheckDomains(void *arg); #include "wl_types.h" -/* ------------------------------------------------------------------ */ -/* Phase 29+: signalfd-based signal handling */ -/* ------------------------------------------------------------------ */ /* * wl_signalfd_handler -- called from within wl_event_loop_dispatch() when diff --git a/src/backend/wayland/wl_stubs.c b/src/backend/wayland/wl_stubs.c index 6504b52..8d536a1 100644 --- a/src/backend/wayland/wl_stubs.c +++ b/src/backend/wayland/wl_stubs.c @@ -47,8 +47,6 @@ void wl_appicon_paint(WAppIcon *aicon); extern void *W_RegisterBacking(unsigned long id, void *img); extern void W_UnregisterBacking(unsigned long id); -/* Phase 80: no-op stubs for X11-only operations */ -/* ------------------------------------------------------------------ */ void wl_noop_frame_alloc_border_pixel(unsigned long colormap, const char *color_name, unsigned long **pixel_out) @@ -993,7 +991,6 @@ RContext *wl_create_rcontext(int screen_number, RContextAttributes *attribs) /* ------------------------------------------------------------------ */ /* vtable */ -/* ------------------------------------------------------------------ */ const WMBackend wl_backend = { .is_wayland = 1, /* Path 1: distinguishes Wayland from X11 */ diff --git a/src/backend/wayland/wl_text_input.c b/src/backend/wayland/wl_text_input.c index 07d6771..c195f1a 100644 --- a/src/backend/wayland/wl_text_input.c +++ b/src/backend/wayland/wl_text_input.c @@ -5,7 +5,6 @@ #include #include "wl_types.h" -/* Phase 34: text input v3, input method v2, virtual keyboard v1 */ /* ------------------------------------------------------------------ */ /* diff --git a/src/backend/wayland/wl_virtual_pointer.c b/src/backend/wayland/wl_virtual_pointer.c index f9033d3..5c6bfcd 100644 --- a/src/backend/wayland/wl_virtual_pointer.c +++ b/src/backend/wayland/wl_virtual_pointer.c @@ -5,7 +5,6 @@ #include #include "wl_types.h" -/* Phase 37: data control, input inhibitor, virtual pointer, idle, */ /* xdg-foreign */ /* ------------------------------------------------------------------ */ diff --git a/src/backend/wayland/wl_window.c b/src/backend/wayland/wl_window.c index ef2ba31..f3a60da 100644 --- a/src/backend/wayland/wl_window.c +++ b/src/backend/wayland/wl_window.c @@ -23,7 +23,6 @@ pixman_image_t *get_window_image_from_x11(Display *x_display, WNativeWindow win) Bool wl_window_fetch_name(WNativeWindow win, char **name_out) { - /* Phase 41: XDG title / Phase 17: XWayland title. */ struct wl_toplevel_view *v = wl_find_view_by_id(win); const char *title = NULL; if (v && v->xw_surface) @@ -40,7 +39,6 @@ wl_window_fetch_name(WNativeWindow win, char **name_out) Bool wl_window_get_icon_name(WNativeWindow win, char **name_out) { - /* Phase 60: return title for icon labels; Phase 17: XWayland path. */ struct wl_toplevel_view *v = wl_find_view_by_id(win); const char *title = NULL; if (v && v->xw_surface) @@ -347,14 +345,12 @@ int wl_window_get_rect(WNativeWindow win, int *win_x, int *win_y, int *win_w, int *win_h) { - /* Phase 55: return real geometry for synthetic toplevel IDs. */ if (win == WNATIVE_NONE) { if (win_x) { *win_x = 0; } if (win_y) { *win_y = 0; } if (win_w) { *win_w = 1; } if (win_h) { *win_h = 1; } return 0; /* invalid/none */ } struct wl_toplevel_view *v = wl_find_view_by_id(win); - /* Phase 17: XWayland geometry. */ if (v && v->xw_surface) { if (win_x) { *win_x = v->x; } if (win_y) { *win_y = v->y; } diff --git a/src/backend/wayland/wl_wings.c b/src/backend/wayland/wl_wings.c index c7fda7d..19804d1 100644 --- a/src/backend/wayland/wl_wings.c +++ b/src/backend/wayland/wl_wings.c @@ -5,9 +5,6 @@ #include "../../screen.h" #include "wl_types.h" -/* ------------------------------------------------------------------ */ -/* Phase A: WINGs event backend wiring helpers */ -/* ------------------------------------------------------------------ */ /* * Get the WMScreen (W_Screen) for screen 0. Returns NULL if StartUp() diff --git a/src/backend/wayland/wl_xdg.c b/src/backend/wayland/wl_xdg.c index 645d95a..1c176b1 100644 --- a/src/backend/wayland/wl_xdg.c +++ b/src/backend/wayland/wl_xdg.c @@ -33,7 +33,6 @@ void wm_dock_app_remove(WNativeWindow id); #define VIEW_FROM_LISTENER(ptr, field) ((struct wl_toplevel_view *)((char *)(ptr) - offsetof(struct wl_toplevel_view, field))) -/* Phase 41: look up the view for a given synthetic Window ID. */ struct wl_toplevel_view * wl_find_view_by_id(WNativeWindow id) { @@ -45,7 +44,6 @@ wl_find_view_by_id(WNativeWindow id) return NULL; } -/* Phase 65: look up the view for a given wlr_xdg_surface pointer. */ struct wl_toplevel_view * wl_find_view_by_xdg_surface(struct wlr_xdg_surface *surf) { @@ -235,7 +233,6 @@ handle_toplevel_map(struct wl_listener *listener, void *data) const char *app_id_check = view->xdg_surface->toplevel->app_id; int is_popup = (app_id_check && strcmp(app_id_check, "wings-popup") == 0); - /* Phase 39/41: register the surface as a managed window. */ { WScreen *scr = wScreenWithNumber(0); if (scr) { @@ -332,7 +329,6 @@ handle_toplevel_map(struct wl_listener *listener, void *data) } } - /* Phase 30+: add to dock icon list */ wm_dock_app_add(view); } } @@ -357,10 +353,8 @@ handle_toplevel_unmap(struct wl_listener *listener, void *data) view->ft_handle = NULL; } - /* Phase 30+: remove from dock icon list */ wm_dock_app_remove(view->id); - /* Phase 40: remove the WWindow from the WM's managed list. */ WScreen *scr = wScreenWithNumber(0); if (scr) { WObjDescriptor *desc = wm_backend->context_find(view->id, WM_CTX_CLIENT_WIN); @@ -397,7 +391,6 @@ handle_toplevel_destroy(struct wl_listener *listener, void *data) wl_list_remove(&view->commit_listener.link); wl_list_remove(&view->surface_commit_listener.link); wl_list_remove(&view->link); - /* Phase 18: remove scene node. */ if (view->scene_node) { /* Remove our destroy listener BEFORE destroying so the listener * doesn't fire and try to remove itself from a list we're @@ -407,8 +400,8 @@ handle_toplevel_destroy(struct wl_listener *listener, void *data) view->scene_node = NULL; } wl_state.managed_surface_count--; - if (view->wm_state) wfree(view->wm_state); /* Phase 56 */ - if (view->wm_command) { /* Phase 57 */ + if (view->wm_state) wfree(view->wm_state); + if (view->wm_command) { int ci; for (ci = 0; ci < view->wm_command_n; ci++) wfree(view->wm_command[ci]); diff --git a/src/backend/wayland/wl_xdg_activation.c b/src/backend/wayland/wl_xdg_activation.c index 6f3c104..1636266 100644 --- a/src/backend/wayland/wl_xdg_activation.c +++ b/src/backend/wayland/wl_xdg_activation.c @@ -17,7 +17,6 @@ /* Forward declarations */ struct wl_frame_buf *frame_buf_find(WNativeWindow id); -/* Phase 35: foreign toplevel management + xdg_activation */ /* ------------------------------------------------------------------ */ /* @@ -72,4 +71,3 @@ handle_xdg_activation_request(struct wl_listener *listener, void *data) wwarning("wl_backend: xdg_activation request for unknown surface (ignored)"); } -/* ------------------------------------------------------------------ */ diff --git a/src/backend/wayland/wl_xkb.c b/src/backend/wayland/wl_xkb.c index 041887c..5fbb1fd 100644 --- a/src/backend/wayland/wl_xkb.c +++ b/src/backend/wayland/wl_xkb.c @@ -7,7 +7,6 @@ /* ------------------------------------------------------------------ */ /* XKB */ -/* ------------------------------------------------------------------ */ WKeyCode wl_keysym_to_keycode(unsigned long keysym) @@ -52,7 +51,6 @@ wl_keysym_to_keycode(unsigned long keysym) unsigned long wl_keysym_from_keycode(unsigned int keycode, unsigned int index) { - /* Phase 77: reverse lookup — return the keysym at the given keycode/level. */ struct xkb_keymap *km = wl_state.xkb_keymap; if (wl_state.keyboard_dev) { struct wlr_keyboard *kb = wlr_keyboard_from_input_device(wl_state.keyboard_dev); diff --git a/src/backend/wayland/wl_xwayland.c b/src/backend/wayland/wl_xwayland.c index 6fd133c..efd32fb 100644 --- a/src/backend/wayland/wl_xwayland.c +++ b/src/backend/wayland/wl_xwayland.c @@ -26,9 +26,6 @@ void wl_pointer_warp_to(int x, int y); #define VIEW_FROM_LISTENER(ptr, field) \ ((struct wl_toplevel_view *)((char *)(ptr) - offsetof(struct wl_toplevel_view, field))) -/* ------------------------------------------------------------------ */ -/* Phase 17: XWayland surface lifecycle */ -/* ------------------------------------------------------------------ */ /* --- Override-redirect (unmanaged) XWayland surface handlers --- */