|
|
@ -6,6 +6,7 @@
|
|
|
|
#include <wlr/types/wlr_output_layout.h>
|
|
|
|
#include <wlr/types/wlr_output_layout.h>
|
|
|
|
#include <wlr/types/wlr_output.h>
|
|
|
|
#include <wlr/types/wlr_output.h>
|
|
|
|
#include <wlr/xwayland.h>
|
|
|
|
#include <wlr/xwayland.h>
|
|
|
|
|
|
|
|
#include <xcb/xcb_icccm.h>
|
|
|
|
#include "log.h"
|
|
|
|
#include "log.h"
|
|
|
|
#include "sway/desktop.h"
|
|
|
|
#include "sway/desktop.h"
|
|
|
|
#include "sway/desktop/transaction.h"
|
|
|
|
#include "sway/desktop/transaction.h"
|
|
|
@ -311,7 +312,7 @@ static bool wants_floating(struct sway_view *view) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_xwayland_surface_size_hints *size_hints = surface->size_hints;
|
|
|
|
xcb_size_hints_t *size_hints = surface->size_hints;
|
|
|
|
if (size_hints != NULL &&
|
|
|
|
if (size_hints != NULL &&
|
|
|
|
size_hints->min_width > 0 && size_hints->min_height > 0 &&
|
|
|
|
size_hints->min_width > 0 && size_hints->min_height > 0 &&
|
|
|
|
(size_hints->max_width == size_hints->min_width ||
|
|
|
|
(size_hints->max_width == size_hints->min_width ||
|
|
|
@ -365,7 +366,7 @@ static void destroy(struct sway_view *view) {
|
|
|
|
static void get_constraints(struct sway_view *view, double *min_width,
|
|
|
|
static void get_constraints(struct sway_view *view, double *min_width,
|
|
|
|
double *max_width, double *min_height, double *max_height) {
|
|
|
|
double *max_width, double *min_height, double *max_height) {
|
|
|
|
struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface;
|
|
|
|
struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface;
|
|
|
|
struct wlr_xwayland_surface_size_hints *size_hints = surface->size_hints;
|
|
|
|
xcb_size_hints_t *size_hints = surface->size_hints;
|
|
|
|
|
|
|
|
|
|
|
|
if (size_hints == NULL) {
|
|
|
|
if (size_hints == NULL) {
|
|
|
|
*min_width = DBL_MIN;
|
|
|
|
*min_width = DBL_MIN;
|
|
|
@ -684,14 +685,15 @@ static void handle_set_hints(struct wl_listener *listener, void *data) {
|
|
|
|
if (!xsurface->mapped) {
|
|
|
|
if (!xsurface->mapped) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!xsurface->hints_urgency && view->urgent_timer) {
|
|
|
|
const bool hints_urgency = xcb_icccm_wm_hints_get_urgency(xsurface->hints);
|
|
|
|
|
|
|
|
if (!hints_urgency && view->urgent_timer) {
|
|
|
|
// The view is in the timeout period. We'll ignore the request to
|
|
|
|
// The view is in the timeout period. We'll ignore the request to
|
|
|
|
// unset urgency so that the view remains urgent until the timer clears
|
|
|
|
// unset urgency so that the view remains urgent until the timer clears
|
|
|
|
// it.
|
|
|
|
// it.
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (view->allow_request_urgent) {
|
|
|
|
if (view->allow_request_urgent) {
|
|
|
|
view_set_urgent(view, (bool)xsurface->hints_urgency);
|
|
|
|
view_set_urgent(view, hints_urgency);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|