-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor preperations for cosmic-workspaces implementation (#211)
* wayland: verify versions for foreign-toplevel and xdg-output * wayland/ipc.c: use single entry point for IPC * workspaces: add _supported() and _set_name()
- Loading branch information
1 parent
407da69
commit 5aea03c
Showing
8 changed files
with
81 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* This entire file is licensed under GNU General Public License v3.0 | ||
* | ||
* Copyright 2022- sfwbar maintainers | ||
*/ | ||
|
||
#include <gdk/gdkwayland.h> | ||
#include "wlr-foreign-toplevel-management-unstable-v1.h" | ||
|
||
void foreign_toplevel_register(struct wl_registry *registry, | ||
uint32_t global, uint32_t version); | ||
|
||
static void handle_global(void *data, struct wl_registry *registry, | ||
uint32_t global, const gchar *interface, uint32_t version) | ||
{ | ||
if (!g_strcmp0(interface,zwlr_foreign_toplevel_manager_v1_interface.name)) | ||
foreign_toplevel_register(registry, global, version); | ||
} | ||
|
||
static void handle_global_remove(void *data, struct wl_registry *registry, | ||
uint32_t name) | ||
{ | ||
} | ||
|
||
static const struct wl_registry_listener registry_listener = { | ||
.global = handle_global, | ||
.global_remove = handle_global_remove | ||
}; | ||
|
||
void wayland_ipc_init ( void ) | ||
{ | ||
struct wl_display *wdisp; | ||
struct wl_registry *registry; | ||
|
||
wdisp = gdk_wayland_display_get_wl_display(gdk_display_get_default()); | ||
if(!wdisp) | ||
g_error("Can't get wayland display\n"); | ||
|
||
registry = wl_display_get_registry(wdisp); | ||
wl_registry_add_listener(registry, ®istry_listener, NULL); | ||
wl_display_roundtrip(wdisp); | ||
|
||
wl_display_roundtrip(wdisp); | ||
wl_display_roundtrip(wdisp); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters