Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

xwm: add support for xwayland minimize #2337

Merged
merged 1 commit into from
Jul 21, 2020

Conversation

junglerobba
Copy link
Contributor

Since #2336 was the wrong approach,
I adopted the work from #2264 and I hope I didn't
miss any of the open issues on it.

I'm also not quite sure if the minimize event is necessary, so I left it in a separate commit for now.

A patch for sway that simply rejects minimize requests can be found here junglerobba/sway@9a5d842 (caution, because it causes heavy flickering on wine games that were
previously acting as described here swaywm/sway#4324 )

@ammen99
Copy link
Member

ammen99 commented Jul 18, 2020

I'm also not quite sure if the minimize event is necessary, so I left it in a separate commit for now.

Looking at #2264 the minimize event should be necessary for any compositor which actually supports minimization (for example Wayfire).

@soreau
Copy link
Contributor

soreau commented Jul 20, 2020

I'm also not quite sure if the minimize event is necessary, so I left it in a separate commit for now.

Looking at #2264 the minimize event should be necessary for any compositor which actually supports minimization (for example Wayfire).

I have tested and wayfire can work with or without the second patch, it's just an extra LOC or two in wayfire with it. I tested minimizing from xwayland csd client as well as minimize from the panel window list. If I understand correctly, the event is present regardless but with the second patch, there is an associated event struct, which doesn't seem to be necessary.

@ammen99
Copy link
Member

ammen99 commented Jul 20, 2020

If I understand correctly, the event is present regardless but with the second patch, there is an associated event struct, which doesn't seem to be necessary.

The event struct is necessary to differentiate between client minimizing and restoring itself. While usually you don't interact with a minimized view (so it won't restore itself), maybe this would be necessary for applications which can be activated via dbus or something?

xwayland/xwm.c Outdated
xsurface->saved_height = xsurface->height;
}

struct wlr_xwayland_minimize_event minimize_event;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use an initializer here to avoid future fields from being undefined?

struct wlr_xwayland_minimize_event event = {
	.surface = xsurface,
	…
};

xwayland/xwm.c Outdated
return;
}

struct wlr_xwayland_minimize_event minimize_event;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from this minor comment, LGTM

@junglerobba junglerobba requested a review from emersion July 21, 2020 10:37
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@emersion emersion merged commit bd387da into swaywm:master Jul 21, 2020
@junglerobba junglerobba deleted the xwayland-minimize branch July 21, 2020 18:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants