.gitignore: exclude generated wmaker-popup-v1 files; keep protocols/
Generated *-protocol.c and *-server-protocol.h files were accidentally committed in the previous commit. The .gitignore was also excluding the protocols/ source directory (where the XML lives). Fix both.
This commit is contained in:
parent
60348da411
commit
b5cc53a8a8
|
|
@ -35,7 +35,6 @@ missing
|
|||
|
||||
# Generated Wayland protocol headers
|
||||
*-protocol.h
|
||||
protocols/
|
||||
|
||||
# Compiled binaries
|
||||
src/wmaker
|
||||
|
|
@ -91,6 +90,10 @@ configure~
|
|||
# WINGs Wayland-client backend: auto-generated by wayland-scanner
|
||||
WINGs/xdg-shell-protocol.c
|
||||
WINGs/xdg-shell-client-protocol.h
|
||||
WINGs/wmaker-popup-v1-protocol.c
|
||||
WINGs/wmaker-popup-v1-client-protocol.h
|
||||
src/wmaker-popup-v1-protocol.c
|
||||
src/wmaker-popup-v1-server-protocol.h
|
||||
|
||||
# User scratch
|
||||
+cmd
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.24.0 */
|
||||
|
||||
/*
|
||||
* Copyright © 2026 Window Maker Team
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "wayland-util.h"
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
|
||||
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define WL_PRIVATE
|
||||
#endif
|
||||
|
||||
extern const struct wl_interface wmaker_popup_v1_interface;
|
||||
extern const struct wl_interface xdg_toplevel_interface;
|
||||
|
||||
static const struct wl_interface *wmaker_popup_v1_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
&wmaker_popup_v1_interface,
|
||||
&xdg_toplevel_interface,
|
||||
};
|
||||
|
||||
static const struct wl_message wmaker_popup_manager_v1_requests[] = {
|
||||
{ "destroy", "", wmaker_popup_v1_types + 0 },
|
||||
{ "get_popup", "no", wmaker_popup_v1_types + 2 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface wmaker_popup_manager_v1_interface = {
|
||||
"wmaker_popup_manager_v1", 1,
|
||||
2, wmaker_popup_manager_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message wmaker_popup_v1_requests[] = {
|
||||
{ "destroy", "", wmaker_popup_v1_types + 0 },
|
||||
{ "set_position", "ii", wmaker_popup_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface wmaker_popup_v1_interface = {
|
||||
"wmaker_popup_v1", 1,
|
||||
2, wmaker_popup_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="wmaker_popup_v1">
|
||||
<copyright>
|
||||
Copyright © 2026 Window Maker Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="Window Maker popup positioning protocol">
|
||||
This protocol allows Window Maker WINGs clients (such as WPrefs) to
|
||||
request specific screen positions for borderless popup-style toplevel
|
||||
windows (menu editor items, popup dropdown menus, tear-off menus).
|
||||
|
||||
Standard xdg_shell does not allow clients to position toplevels — only
|
||||
the compositor decides placement. This is correct for normal application
|
||||
windows but breaks WINGs UI patterns that require client-driven positioning
|
||||
(e.g., a dropdown menu must appear directly below its triggering button).
|
||||
|
||||
A client wraps an xdg_toplevel with a wmaker_popup object and calls
|
||||
set_position(x, y) before the surface is mapped. The compositor honours
|
||||
the position when the surface becomes visible. Subsequent set_position
|
||||
calls reposition the surface immediately.
|
||||
|
||||
The popup loses no other xdg_toplevel features — it remains an ordinary
|
||||
toplevel for input, focus, and lifetime purposes. The compositor is
|
||||
additionally expected to omit decorations and skip taskbar/dock listing
|
||||
for popup-wrapped toplevels (typically signalled via app_id).
|
||||
</description>
|
||||
|
||||
<interface name="wmaker_popup_manager_v1" version="1">
|
||||
<description summary="manager for wmaker_popup objects">
|
||||
Singleton global advertised by Window Maker compositors that support
|
||||
client-driven popup positioning. Clients bind once and use it to wrap
|
||||
xdg_toplevel objects.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="release the manager">
|
||||
Destroy the manager. Existing wmaker_popup objects remain valid.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_popup">
|
||||
<description summary="wrap an xdg_toplevel as a popup">
|
||||
Wrap the given xdg_toplevel in a wmaker_popup object so the client
|
||||
can drive its position. The toplevel must not yet be mapped.
|
||||
Calling get_popup more than once for the same toplevel is a
|
||||
protocol error.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wmaker_popup_v1"
|
||||
summary="the new popup object"/>
|
||||
<arg name="toplevel" type="object" interface="xdg_toplevel"
|
||||
summary="the toplevel to wrap"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="wmaker_popup_v1" version="1">
|
||||
<description summary="client-positioned popup toplevel">
|
||||
Wrapper around an xdg_toplevel that lets the client drive screen
|
||||
placement. Position is in compositor-global coordinates.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="invalid_position" value="0"
|
||||
summary="position is outside any output"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="release the popup">
|
||||
Destroying the popup reverts the toplevel to compositor-driven
|
||||
placement. The underlying xdg_toplevel remains valid until the
|
||||
client destroys it explicitly.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_position">
|
||||
<description summary="set the screen position of the popup">
|
||||
Place the popup's top-left corner at (x, y) in compositor-global
|
||||
coordinates. Takes effect on the next surface commit if the
|
||||
toplevel is not yet mapped, or immediately if already mapped.
|
||||
</description>
|
||||
<arg name="x" type="int" summary="screen x in compositor coordinates"/>
|
||||
<arg name="y" type="int" summary="screen y in compositor coordinates"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.24.0 */
|
||||
|
||||
/*
|
||||
* Copyright © 2026 Window Maker Team
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "wayland-util.h"
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
|
||||
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define WL_PRIVATE
|
||||
#endif
|
||||
|
||||
extern const struct wl_interface wmaker_popup_v1_interface;
|
||||
extern const struct wl_interface xdg_toplevel_interface;
|
||||
|
||||
static const struct wl_interface *wmaker_popup_v1_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
&wmaker_popup_v1_interface,
|
||||
&xdg_toplevel_interface,
|
||||
};
|
||||
|
||||
static const struct wl_message wmaker_popup_manager_v1_requests[] = {
|
||||
{ "destroy", "", wmaker_popup_v1_types + 0 },
|
||||
{ "get_popup", "no", wmaker_popup_v1_types + 2 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface wmaker_popup_manager_v1_interface = {
|
||||
"wmaker_popup_manager_v1", 1,
|
||||
2, wmaker_popup_manager_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message wmaker_popup_v1_requests[] = {
|
||||
{ "destroy", "", wmaker_popup_v1_types + 0 },
|
||||
{ "set_position", "ii", wmaker_popup_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface wmaker_popup_v1_interface = {
|
||||
"wmaker_popup_v1", 1,
|
||||
2, wmaker_popup_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue