[client] clipboard/wayland: make use of boilerplate from wm.c

This commit is contained in:
Tudor Brindus
2021-01-11 20:55:42 -05:00
committed by Geoffrey McRae
parent 2aa2ec31ef
commit 96c10c2c2d
4 changed files with 133 additions and 169 deletions

View File

@@ -17,6 +17,43 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdbool.h>
#include <stdint.h>
struct WMState
{
bool pointerGrabbed;
bool keyboardGrabbed;
void * opaque;
};
struct WMDataWayland
{
struct wl_display * display;
struct wl_surface * surface;
struct wl_registry * registry;
struct wl_seat * seat;
struct wl_data_device_manager * dataDeviceManager;
struct wl_data_device * dataDevice;
uint32_t capabilities;
struct wl_keyboard * keyboard;
struct zwp_keyboard_shortcuts_inhibit_manager_v1 * keyboardInhibitManager;
struct zwp_keyboard_shortcuts_inhibitor_v1 * keyboardInhibitor;
uint32_t keyboardEnterSerial;
struct wl_pointer * pointer;
struct zwp_relative_pointer_manager_v1 * relativePointerManager;
struct zwp_pointer_constraints_v1 * pointerConstraints;
struct zwp_relative_pointer_v1 * relativePointer;
struct zwp_confined_pointer_v1 * confinedPointer;
};
struct WMState g_wmState;
void wmInit();
void wmFree();
void wmGrabPointer();