#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
#include "xdg-shell-client-header.h"
#endif
-//#include "xdg-decoration-client-header.h"
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+#include "xdg-decoration-client-header.h"
+#endif
#endif
#ifdef _WIN32
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
struct xdg_wm_base *xdg_wm_base;
#endif
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
struct zxdg_decoration_manager_v1 *xdg_decoration_mgr;
struct zxdg_toplevel_decoration_v1 *toplevel_decoration;
+#endif
struct wl_shell_surface *xdg_surface;
int xdg_surface_has_been_configured;
struct xdg_toplevel *xdg_toplevel;
wl_surface_destroy(demo->window);
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
xdg_wm_base_destroy(demo->xdg_wm_base);
+#endif
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
if (demo->xdg_decoration_mgr) {
zxdg_toplevel_decoration_v1_destroy(demo->toplevel_decoration);
zxdg_decoration_manager_v1_destroy(demo->xdg_decoration_mgr);
xdg_surface_add_listener(demo->xdg_surface, &xdg_surface_listener, demo);
xdg_toplevel_add_listener(demo->xdg_toplevel, &xdg_toplevel_listener, demo);
xdg_toplevel_set_title(demo->xdg_toplevel, APP_SHORT_NAME);
+#endif
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
if (demo->xdg_decoration_mgr) {
// if supported, let the compositor render titlebars for us
demo->toplevel_decoration =
else if (strcmp(interface, wl_seat_interface.name) == 0) {
demo->seat = wl_registry_bind(registry, id, &wl_seat_interface, 1);
wl_seat_add_listener(demo->seat, &seat_listener, demo);
- } /*else if (strcmp(interface, zxdg_decoration_manager_v1_interface.name) == 0) {
+ }
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+ else if (strcmp(interface, zxdg_decoration_manager_v1_interface.name) == 0) {
demo->xdg_decoration_mgr = wl_registry_bind(registry, id, &zxdg_decoration_manager_v1_interface, 1);
- }*/
+ }
+#endif
}
static void registry_handle_global_remove(void *data UNUSED, struct wl_registry *registry UNUSED, uint32_t name UNUSED) {}
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
#include "xdg-shell-client-header.h"
#endif
-//#include "xdg-decoration-client-header.h"
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+#include "xdg-decoration-client-header.h"
+#endif
#endif
#include <cassert>
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
xdg_wm_base *wm_base;
#endif
- //zxdg_decoration_manager_v1 *xdg_decoration_mgr;
- //zxdg_toplevel_decoration_v1 *toplevel_decoration;
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+ zxdg_decoration_manager_v1 *xdg_decoration_mgr;
+ zxdg_toplevel_decoration_v1 *toplevel_decoration;
+#endif
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
xdg_surface *window_surface;
#endif
else if (strcmp(interface, wl_seat_interface.name) == 0) {
demo->seat = (wl_seat *)wl_registry_bind(registry, id, &wl_seat_interface, 1);
wl_seat_add_listener(demo->seat, &seat_listener, demo);
- } /*else if (strcmp(interface, zxdg_decoration_manager_v1_interface.name) == 0) {
+ }
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+ else if (strcmp(interface, zxdg_decoration_manager_v1_interface.name) == 0) {
demo->xdg_decoration_mgr =
(zxdg_decoration_manager_v1 *)wl_registry_bind(registry, id, &zxdg_decoration_manager_v1_interface, 1);
- }*/
+ }
+#endif
}
static void registry_handle_global_remove(void *data, wl_registry *registry, uint32_t name) {}
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
wm_base{nullptr},
#endif
- //xdg_decoration_mgr{nullptr},
- //toplevel_decoration{nullptr},
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+ xdg_decoration_mgr{nullptr},
+ toplevel_decoration{nullptr},
+#endif
window_surface{nullptr},
xdg_surface_has_been_configured{false},
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
#ifdef TIZEN_SUPPPORT_XDG_WM_BASE
xdg_wm_base_destroy(wm_base);
#endif
- /*if (xdg_decoration_mgr) {
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+ if (xdg_decoration_mgr) {
zxdg_toplevel_decoration_v1_destroy(toplevel_decoration);
zxdg_decoration_manager_v1_destroy(xdg_decoration_mgr);
- }*/
+ }
+#endif
wl_compositor_destroy(compositor);
wl_registry_destroy(registry);
wl_display_disconnect(display);
xdg_toplevel_add_listener(window_toplevel, &toplevel_listener, this);
xdg_toplevel_set_title(window_toplevel, APP_SHORT_NAME);
#endif
- /*if (xdg_decoration_mgr) {
+#ifdef TIZEN_SUPPPORT_XDG_DECORATION
+ if (xdg_decoration_mgr) {
// if supported, let the compositor render titlebars for us
toplevel_decoration = zxdg_decoration_manager_v1_get_toplevel_decoration(xdg_decoration_mgr, window_toplevel);
zxdg_toplevel_decoration_v1_set_mode(toplevel_decoration, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
- }*/
+ }
+#endif
wl_surface_commit(window);
}