diff --git a/make/modules/java.desktop/gensrc/GensrcWayland.gmk b/make/modules/java.desktop/gensrc/GensrcWayland.gmk index 0560f3676674..d57f1ae77854 100644 --- a/make/modules/java.desktop/gensrc/GensrcWayland.gmk +++ b/make/modules/java.desktop/gensrc/GensrcWayland.gmk @@ -34,6 +34,7 @@ WAYLAND_BASIC_PROTOCOL_FILES := \ $(WAYLAND_PROTOCOLS_ROOT)/stable/xdg-shell/xdg-shell.xml \ $(WAYLAND_PROTOCOLS_ROOT)/staging/xdg-activation/xdg-activation-v1.xml \ $(WAYLAND_PROTOCOLS_ROOT)/unstable/primary-selection/primary-selection-unstable-v1.xml \ + $(WAYLAND_PROTOCOLS_ROOT)/unstable/xdg-output/xdg-output-unstable-v1.xml \ $(GTK_SHELL1_PROTOCOL_PATH) \ # diff --git a/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsConfig.java b/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsConfig.java index f72ac7894ef0..c05f185a5dc9 100644 --- a/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsConfig.java +++ b/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsConfig.java @@ -39,17 +39,27 @@ public abstract class WLGraphicsConfig extends GraphicsConfiguration { private final WLGraphicsDevice device; private final int x; private final int y; + private final int xLogical; // logical (scaled) horizontal location; optional, could be zero + private final int yLogical; // logical (scaled) vertical location; optional, could be zero private final int width; private final int height; + private final int widthLogical; // logical (scaled) width; optional, could be zero + private final int heightLogical;// logical (scaled) height; optional, could be zero private final int displayScale; // as reported by Wayland private final double effectiveScale; // as enforced by Java - protected WLGraphicsConfig(WLGraphicsDevice device, int x, int y, int width, int height, int displayScale) { + protected WLGraphicsConfig(WLGraphicsDevice device, int x, int y, int xLogical, int yLogical, + int width, int height, int widthLogical, int heightLogical, + int displayScale) { this.device = device; this.x = x; this.y = y; + this.xLogical = xLogical; + this.yLogical = yLogical; this.width = width; this.height = height; + this.widthLogical = widthLogical; + this.heightLogical = heightLogical; this.displayScale = displayScale; this.effectiveScale = WLGraphicsEnvironment.effectiveScaleFrom(displayScale); } @@ -86,10 +96,13 @@ public AffineTransform getNormalizingTransform() { @Override public Rectangle getBounds() { - // NB: despite the claims of GraphicsConfiguration.getBounds()'s javadoc, - // the value returned is expected to be in user-space coordinates, - // same as windows sizes, offsets, components' coordinates, etc. - return new Rectangle(x, y, (int) (width / effectiveScale), (int) (height / effectiveScale)); + return (widthLogical > 0 && heightLogical > 0) + ? new Rectangle(xLogical, yLogical, widthLogical, heightLogical) + : new Rectangle(x, y, width, height); + } + + public Rectangle getRealBounds() { + return new Rectangle(x, y, width, height); } /** diff --git a/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsDevice.java b/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsDevice.java index f0cb36f1c5b8..f677df38f363 100644 --- a/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsDevice.java +++ b/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsDevice.java @@ -65,6 +65,9 @@ public class WLGraphicsDevice extends GraphicsDevice { */ private volatile int y; // only changes when the device gets invalidated + private volatile int xLogical; // logical (scaled) horizontal location; optional, could be zero + private volatile int yLogical; // logical (scaled) vertical location; optional, could be zero + private final int widthMm; private final int heightMm; @@ -78,10 +81,12 @@ public class WLGraphicsDevice extends GraphicsDevice { // and get their graphics configuration from it private final Set toplevels = new HashSet<>(); // guarded by 'this' - private WLGraphicsDevice(int id, int x, int y, int widthMm, int heightMm) { + private WLGraphicsDevice(int id, int x, int y, int xLogical, int yLogical, int widthMm, int heightMm) { this.wlID = id; this.x = x; this.y = y; + this.xLogical = xLogical; + this.yLogical = yLogical; this.widthMm = widthMm; this.heightMm = heightMm; } @@ -90,7 +95,7 @@ int getID() { return wlID; } - void updateConfiguration(String name, int width, int height, int scale) { + void updateConfiguration(String name, int width, int height, int widthLogical, int heightLogical, int scale) { this.name = name; WLGraphicsConfig config = defaultConfig; @@ -101,16 +106,16 @@ void updateConfiguration(String name, int width, int height, int scale) { // It is necessary to create a new object whenever config changes as its // identity is used to detect changes in scale, among other things. if (VKInstance.isVulkanEnabled()) { - newDefaultConfig = WLVKGraphicsConfig.getConfig(this, x, y, width, height, scale); + newDefaultConfig = WLVKGraphicsConfig.getConfig(this, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale); newConfigs = new GraphicsConfiguration[1]; newConfigs[0] = newDefaultConfig; } else { // TODO: Actually, Wayland may support a lot more shared memory buffer configurations, need to // subscribe to the wl_shm:format event and get the list from there. - newDefaultConfig = WLSMGraphicsConfig.getConfig(this, x, y, width, height, scale, false); + newDefaultConfig = WLSMGraphicsConfig.getConfig(this, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale, false); newConfigs = new GraphicsConfiguration[2]; newConfigs[0] = newDefaultConfig; - newConfigs[1] = WLSMGraphicsConfig.getConfig(this, x, y, width, height, scale, true); + newConfigs[1] = WLSMGraphicsConfig.getConfig(this, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale, true); } configs = newConfigs; @@ -145,19 +150,22 @@ void invalidate(WLGraphicsDevice similarDevice) { this.wlID = similarDevice.wlID; this.x = similarDevice.x; this.y = similarDevice.y; + this.xLogical = similarDevice.xLogical; + this.yLogical = similarDevice.yLogical; int newScale = similarDevice.getDisplayScale(); Rectangle newBounds = similarDevice.defaultConfig.getBounds(); - updateConfiguration(similarDevice.name, newBounds.width, newBounds.height, newScale); + Rectangle newRealBounds = similarDevice.defaultConfig.getRealBounds(); + updateConfiguration(similarDevice.name, newRealBounds.width, newRealBounds.height, newBounds.width, newBounds.height, newScale); } public static WLGraphicsDevice createWithConfiguration(int id, String name, - int x, int y, - int width, int height, + int x, int y, int xLogical, int yLogical, + int width, int height, int widthLogical, int heightLogical, int widthMm, int heightMm, int scale) { - WLGraphicsDevice device = new WLGraphicsDevice(id, x, y, widthMm, heightMm); - device.updateConfiguration(name, width, height, scale); + WLGraphicsDevice device = new WLGraphicsDevice(id, x, y, xLogical, yLogical, widthMm, heightMm); + device.updateConfiguration(name, width, height, widthLogical, heightLogical, scale); return device; } @@ -165,8 +173,8 @@ public static WLGraphicsDevice createWithConfiguration(int id, String name, * Compares the identity of this device with the given attributes * and returns true iff the attributes identify the same device. */ - boolean isSameDeviceAs(int wlID, int x, int y) { - return this.wlID == wlID && this.x == x && this.y == y; + boolean isSameDeviceAs(int wlID, int x, int y, int xLogical, int yLogical) { + return this.wlID == wlID && this.x == x && this.y == y && this.xLogical == xLogical && this.yLogical == yLogical; } boolean hasSameNameAs(WLGraphicsDevice otherDevice) { @@ -286,8 +294,8 @@ public void removeWindow(WLComponentPeer peer) { @Override public String toString() { var config = defaultConfig; - return String.format("WLGraphicsDevice: '%s' id=%d at (%d, %d) with %s", - name, wlID, x, y, + return String.format("WLGraphicsDevice: '%s' id=%d at (%d, %d) ((%d, %d) logical) with %s", + name, wlID, x, y, xLogical, yLogical, config != null ? config : ""); } diff --git a/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsEnvironment.java b/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsEnvironment.java index 0d21a19ec415..9c1e5762afcb 100644 --- a/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsEnvironment.java +++ b/src/java.desktop/unix/classes/sun/awt/wl/WLGraphicsEnvironment.java @@ -41,6 +41,15 @@ import sun.util.logging.PlatformLogger.Level; public class WLGraphicsEnvironment extends SunGraphicsEnvironment { + public static final int WL_OUTPUT_TRANSFORM_NORMAL = 0; + public static final int WL_OUTPUT_TRANSFORM_90 = 1; + public static final int WL_OUTPUT_TRANSFORM_180 = 2; + public static final int WL_OUTPUT_TRANSFORM_270 = 3; + public static final int WL_OUTPUT_TRANSFORM_FLIPPED = 4; + public static final int WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5; + public static final int WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6; + public static final int WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7; + private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.wl.WLGraphicsEnvironment"); private static final boolean debugScaleEnabled; @@ -95,12 +104,16 @@ public boolean isDisplayLocal() { private final List devices = new ArrayList<>(5); private void notifyOutputConfigured(String name, String make, String model, int wlID, - int x, int y, int width, int height, int widthMm, int heightMm, + int x, int y, int xLogical, int yLogical, + int width, int height, + int widthLogical, int heightLogical, + int widthMm, int heightMm, int subpixel, int transform, int scale) { // Called from native code whenever a new output appears or an existing one changes its properties // NB: initially called during WLToolkit.initIDs() on the main thread; later on EDT. if (log.isLoggable(Level.FINE)) { - log.fine(String.format("Output configured id=%d at (%d, %d) %dx%d %dx scale", wlID, x, y, width, height, scale)); + log.fine(String.format("Output configured id=%d at (%d, %d) (%d, %d logical) %dx%d (%dx%d logical) %dx scale", + wlID, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale)); } String humanID = @@ -113,12 +126,13 @@ private void notifyOutputConfigured(String name, String make, String model, int final WLGraphicsDevice gd = devices.get(i); if (gd.getID() == wlID) { newOutput = false; - if (gd.isSameDeviceAs(wlID, x, y)) { + if (gd.isSameDeviceAs(wlID, x, y, xLogical, yLogical)) { // These coordinates and the size are not scaled. - gd.updateConfiguration(humanID, width, height, scale); + gd.updateConfiguration(humanID, width, height, widthLogical, heightLogical, scale); } else { final WLGraphicsDevice updatedDevice = WLGraphicsDevice.createWithConfiguration(wlID, humanID, - x, y, width, height, widthMm, heightMm, scale); + x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, + widthMm, heightMm, scale); devices.set(i, updatedDevice); gd.invalidate(updatedDevice); } @@ -126,8 +140,9 @@ private void notifyOutputConfigured(String name, String make, String model, int } } if (newOutput) { - final WLGraphicsDevice gd = WLGraphicsDevice.createWithConfiguration(wlID, humanID, x, y, - width, height, widthMm, heightMm, scale); + final WLGraphicsDevice gd = WLGraphicsDevice.createWithConfiguration(wlID, humanID, + x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, + widthMm, heightMm, scale); devices.add(gd); } if (LogDisplay.ENABLED) { diff --git a/src/java.desktop/unix/classes/sun/awt/wl/WLSMGraphicsConfig.java b/src/java.desktop/unix/classes/sun/awt/wl/WLSMGraphicsConfig.java index 316ca1962ade..ea265e902e49 100644 --- a/src/java.desktop/unix/classes/sun/awt/wl/WLSMGraphicsConfig.java +++ b/src/java.desktop/unix/classes/sun/awt/wl/WLSMGraphicsConfig.java @@ -55,11 +55,15 @@ public class WLSMGraphicsConfig extends WLGraphicsConfig { private WLSMGraphicsConfig(WLGraphicsDevice device, int x, int y, + int xLogical, + int yLogical, int width, int height, + int widthLogical, + int heightLogical, int scale, boolean translucencyCapable) { - super(device, x, y, width, height, scale); + super(device, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale); this.translucencyCapable = translucencyCapable; this.colorModel = colorModelFor(translucencyCapable ? Transparency.TRANSLUCENT : Transparency.OPAQUE); // Note: GNOME Shell definitely expects alpha values to be pre-multiplied @@ -69,11 +73,15 @@ private WLSMGraphicsConfig(WLGraphicsDevice device, public static WLSMGraphicsConfig getConfig(WLGraphicsDevice device, int x, int y, + int xLogical, + int yLogical, int width, int height, + int widthLogical, + int heightLogical, int scale, boolean translucencyCapable) { - var newConfig = new WLSMGraphicsConfig(device, x, y, width, height, scale, translucencyCapable); + var newConfig = new WLSMGraphicsConfig(device, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale, translucencyCapable); if (log.isLoggable(PlatformLogger.Level.FINE)) { log.fine("New shared memory config " + newConfig); } diff --git a/src/java.desktop/unix/classes/sun/java2d/vulkan/WLVKGraphicsConfig.java b/src/java.desktop/unix/classes/sun/java2d/vulkan/WLVKGraphicsConfig.java index 5c347a34f21e..12f3f7c9c8b5 100644 --- a/src/java.desktop/unix/classes/sun/java2d/vulkan/WLVKGraphicsConfig.java +++ b/src/java.desktop/unix/classes/sun/java2d/vulkan/WLVKGraphicsConfig.java @@ -78,8 +78,11 @@ public final class WLVKGraphicsConfig extends WLGraphicsConfig private static native long getVKConfigInfo(); - public WLVKGraphicsConfig(WLGraphicsDevice device, int x, int y, int width, int height, int scale, ContextCapabilities vkCaps) { - super(device, x, y, width, height, scale); + public WLVKGraphicsConfig(WLGraphicsDevice device, + int x, int y, int xLogical, int yLogical, + int width, int height, int widthLogical, int heightLogical, + int scale, ContextCapabilities vkCaps) { + super(device, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale); this.vkCaps = vkCaps; context = new VKContext(VKRenderQueue.getInstance()); } @@ -89,13 +92,16 @@ public SurfaceManager.ProxyCache getSurfaceDataProxyCache() { return surfaceDataProxyCache; } - public static WLVKGraphicsConfig getConfig(WLGraphicsDevice device, int x, int y, int width, int height, int scale) + public static WLVKGraphicsConfig getConfig(WLGraphicsDevice device, + int x, int y, int xLogical, int yLogical, + int width, int height, int widthLogical, int heightLogical, + int scale) { ContextCapabilities caps = new VKContext.VKContextCaps( CAPS_PS30 | CAPS_PS20 | CAPS_RT_TEXTURE_ALPHA | CAPS_RT_TEXTURE_OPAQUE | CAPS_MULTITEXTURE | CAPS_TEXNONPOW2 | CAPS_TEXNONSQUARE, null); - return new WLVKGraphicsConfig(device, x, y, width, height, scale, caps); + return new WLVKGraphicsConfig(device, x, y, xLogical, yLogical, width, height, widthLogical, heightLogical, scale, caps); } /** diff --git a/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.c b/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.c index e9860fabbb6d..c59fc10fa4de 100644 --- a/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.c +++ b/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.c @@ -25,8 +25,10 @@ */ #ifndef HEADLESS +#include #include #include +#include #include #include "JNIUtilities.h" @@ -36,12 +38,17 @@ typedef struct WLOutput { struct WLOutput * next; struct wl_output * wl_output; + struct zxdg_output_v1 * zxdg_output; uint32_t id; int32_t x; int32_t y; + int32_t x_logical; + int32_t y_logical; int32_t width; int32_t height; + int32_t width_logical; + int32_t height_logical; int32_t width_mm; int32_t height_mm; @@ -137,12 +144,8 @@ wl_output_scale( } static void -wl_output_done( - void *data, - struct wl_output *wl_output) +NotifyOutputConfigured(WLOutput* output) { - WLOutput * output = data; - JNIEnv *env = getEnv(); jobject obj = (*env)->CallStaticObjectMethod(env, geClass, getSingleInstanceMID); JNU_CHECK_EXCEPTION(env); @@ -158,8 +161,12 @@ wl_output_done( output->id, output->x, output->y, + output->x_logical, + output->y_logical, output->width, output->height, + output->width_logical, + output->height_logical, output->width_mm, output->height_mm, (jint)output->subpixel, @@ -168,6 +175,17 @@ wl_output_done( JNU_CHECK_EXCEPTION(env); } +static void +wl_output_done(void *data, struct wl_output *wl_output) +{ + WLOutput * output = data; + // When the manager is present we'll wait for another 'done' event (see zxdg_output_done()). + bool wait_for_zxdg_output_done = zxdg_output_manager_v1 != NULL; + if (!wait_for_zxdg_output_done) { + NotifyOutputConfigured(output); + } +} + struct wl_output_listener wl_output_listener = { .geometry = &wl_output_geometry, .mode = &wl_output_mode, @@ -181,6 +199,49 @@ struct wl_output_listener wl_output_listener = { .scale = &wl_output_scale }; +static void +zxdg_output_logical_size(void *data, struct zxdg_output_v1 *zxdg_output_v1, int32_t width, int32_t height) +{ + WLOutput * output = data; + output->width_logical = width; + output->height_logical = height; +} + +static void +zxdg_output_done(void *data, struct zxdg_output_v1 *zxdg_output_v1) +{ + WLOutput * output = data; + NotifyOutputConfigured(output); +} + +static void +zxdg_output_logical_position(void *data, struct zxdg_output_v1 *zxdg_output_v1, int32_t x, int32_t y) +{ + WLOutput * output = data; + output->x_logical = x; + output->y_logical = y; +} + +static void +zxdg_output_description(void *data, struct zxdg_output_v1 *zxdg_output_v1, const char *description) +{ + // Ignored +} + +static void +zxdg_output_name(void *data, struct zxdg_output_v1 *zxdg_output_v1, const char *name) +{ + // Ignored +} + +struct zxdg_output_v1_listener zxdg_output_listener = { + .logical_position = zxdg_output_logical_position, + .logical_size = zxdg_output_logical_size, + .description = zxdg_output_description, + .name = zxdg_output_name, + .done = zxdg_output_done +}; + jboolean WLGraphicsEnvironment_initIDs (JNIEnv *env, jclass clazz) @@ -196,7 +257,7 @@ WLGraphicsEnvironment_initIDs CHECK_NULL_RETURN( notifyOutputConfiguredMID = (*env)->GetMethodID(env, clazz, "notifyOutputConfigured", - "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIIIIII)V"), + "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIIIIIIIIII)V"), JNI_FALSE); CHECK_NULL_RETURN( notifyOutputDestroyedMID = (*env)->GetMethodID(env, clazz, @@ -206,6 +267,17 @@ WLGraphicsEnvironment_initIDs return JNI_TRUE; } +static void RegisterXdgOutput(WLOutput* output) +{ + assert(zxdg_output_manager_v1 != NULL); + + if (output->zxdg_output == NULL) { + output->zxdg_output = zxdg_output_manager_v1_get_xdg_output(zxdg_output_manager_v1, output->wl_output); + CHECK_NULL(output->zxdg_output); + zxdg_output_v1_add_listener(output->zxdg_output, &zxdg_output_listener, output); + } +} + void WLOutputRegister(struct wl_registry *wl_registry, uint32_t id) { @@ -217,10 +289,25 @@ WLOutputRegister(struct wl_registry *wl_registry, uint32_t id) output->wl_output = wl_registry_bind(wl_registry, id, &wl_output_interface, 2); if (output->wl_output == NULL) { JNU_ThrowByName(env, "java/awt/AWTError", "wl_registry_bind() failed"); + return; } wl_output_add_listener(output->wl_output, &wl_output_listener, output); output->next = outputList; outputList = output; + + if (zxdg_output_manager_v1 != NULL) { + RegisterXdgOutput(output); + } +} + +void +WLOutputXdgOutputManagerBecameAvailable(void) +{ + assert(zxdg_output_manager_v1 != NULL); + + for (WLOutput* output = outputList; output; output = output->next) { + RegisterXdgOutput(output); + } } void @@ -236,6 +323,9 @@ WLOutputDeregister(struct wl_registry *wl_registry, uint32_t id) } else { outputList = cur->next; } + if (cur->zxdg_output != NULL) { + zxdg_output_v1_destroy(cur->zxdg_output); + } wl_output_destroy(cur->wl_output); WLOutput * next = cur->next; free(cur->name); diff --git a/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.h b/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.h index e5b5bcd100c3..11859a067e75 100644 --- a/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.h +++ b/src/java.desktop/unix/native/libawt_wlawt/WLGraphicsEnvironment.h @@ -30,3 +30,4 @@ void WLOutputRegister(struct wl_registry *wl_registry, uint32_t id); void WLOutputDeregister(struct wl_registry *wl_registry, uint32_t id); uint32_t WLOutputID(struct wl_output *wlOutput); struct wl_output* WLOutputByID(uint32_t id); +void WLOutputXdgOutputManagerBecameAvailable(void); diff --git a/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.c b/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.c index 3d045762d00d..4a1533912067 100644 --- a/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.c +++ b/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.c @@ -85,6 +85,7 @@ struct wl_cursor_theme *cursor_themes[MAX_CURSOR_SCALE] = {NULL}; struct wl_data_device_manager *wl_ddm = NULL; struct zwp_primary_selection_device_manager_v1 *zwp_selection_dm = NULL; // optional, check for NULL before use +struct zxdg_output_manager_v1 *zxdg_output_manager_v1 = NULL; // optional, check for NULL before use static uint32_t num_of_outstanding_sync = 0; @@ -566,6 +567,12 @@ registry_global(void *data, struct wl_registry *wl_registry, zwp_selection_dm = wl_registry_bind(wl_registry, name, &zwp_primary_selection_device_manager_v1_interface, 1); } else if (strcmp(interface, wp_viewporter_interface.name) == 0) { wp_viewporter = wl_registry_bind(wl_registry, name, &wp_viewporter_interface, 1); + } else if (strcmp(interface, zxdg_output_manager_v1_interface.name) == 0) { + zxdg_output_manager_v1 = wl_registry_bind(wl_registry, name, &zxdg_output_manager_v1_interface, 2); + if (zxdg_output_manager_v1 != NULL) { + WLOutputXdgOutputManagerBecameAvailable(); + process_new_listener_before_end_of_init(); + } } #ifdef WAKEFIELD_ROBOT diff --git a/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.h b/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.h index 0ce6ef748922..59f52b3227db 100644 --- a/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.h +++ b/src/java.desktop/unix/native/libawt_wlawt/WLToolkit.h @@ -27,6 +27,7 @@ #include #include "xdg-shell.h" #include "xdg-activation-v1.h" +#include "xdg-output-unstable-v1.h" #include "primary-selection-unstable-v1.h" #include "viewporter.h" #include "jvm_md.h" @@ -63,6 +64,7 @@ extern struct gtk_shell1* gtk_shell1; // optional, check for NULL before use extern struct wl_cursor_theme *wl_cursor_theme; extern struct wl_data_device_manager *wl_ddm; extern struct zwp_primary_selection_device_manager_v1 *zwp_selection_dm; // optional, check for NULL before use +extern struct zxdg_output_manager_v1 *zxdg_output_manager_v1; // optional, check for NULL before use JNIEnv *getEnv();