Skip to content

Wayland#17

Merged
ivucica merged 23 commits into
gnustep:masterfrom
ivucica:wayland-2
Apr 25, 2020
Merged

Wayland#17
ivucica merged 23 commits into
gnustep:masterfrom
ivucica:wayland-2

Conversation

@ivucica

@ivucica ivucica commented Jan 26, 2020

Copy link
Copy Markdown
Member

This includes contributions from Sergio L. Pascual and Ladislav Michl @3x380V. Both have performed copyright assignment to FSF.

This likely requires a rebase+merge of https://github.com/ivucica/libs-gui/tree/ivucica-wayland as well.

This currently does not run on my machine, as I'm hitting:

    if (!wlconfig->compositor || !wlconfig->wm_base) {
        [NSException raise: NSWindowServerCommunicationException
                    format: @"Unable to get compositor"];

Opening this PR for easier viewing anyway.

@ivucica ivucica requested a review from fredkiefer as a code owner January 26, 2020 21:26
@ivucica ivucica removed the request for review from fredkiefer January 26, 2020 21:34
@ivucica ivucica force-pushed the wayland-2 branch 3 times, most recently from faafc1a to 35b8355 Compare January 26, 2020 22:06

@fredkiefer fredkiefer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I only glanced at this code but apart from minor issues I think we should merge it.

Comment thread Headers/cairo/WaylandCairoSurface.h Outdated
Comment thread Source/cairo/CairoContext.m
Comment thread Source/cairo/WaylandCairoSurface.m
Comment thread Source/cairo/WaylandCairoSurface.m Outdated
Comment thread Source/cairo/WaylandCairoSurface.m Outdated
Comment thread Source/wayland/WaylandServer.m
Comment thread Source/wayland/WaylandServer.m
Comment thread Source/wayland/WaylandServer.m Outdated
Comment thread Source/wayland/WaylandServer.m Outdated
Comment thread Source/wayland/WaylandServer.m Outdated
if (window) {
x += window->pos_x;
y += window->pos_y;
win = &window->window_id;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Check for win being NULL is missing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Interestingly, it was not even writing into *win...

@ivucica

ivucica commented Apr 5, 2020

Copy link
Copy Markdown
Member Author

I'll continue work on this after the next release.

@ivucica ivucica marked this pull request as draft April 14, 2020 23:10
For contributions, we generally ask that copyright is assigned
to FSF. I believe this has been done by Sergio.

@ivucica ivucica left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I needed to enter this comment field for some reason...

ivucica added 2 commits April 15, 2020 00:35
Rearranging order of the code, freeing some memory, writing a note
that additional work is required, returning a value through pointer
passed as argument, etc.
@ivucica ivucica marked this pull request as ready for review April 14, 2020 23:37
@ivucica

ivucica commented Apr 14, 2020

Copy link
Copy Markdown
Member Author

Sorry for the noise and presumably numerous emails. Github review UI was surprisingly not letting me comment directly in the pull request after I started a review; presumably I was supposed to write replies 'somewhere else'.

I think your comments are useful, so I am reluctant to just go ahead and merge as-is, thus losing the information in this then-merged PR.

I intended to run the code today, but I only got around to rebasing the code, and addressing the most superficial of problems you spotted. Thank you for looking at this in-depth; applying some fixes will be tricky as well, as I am new to Wayland and this new code. Perhaps soon.

@ivucica

ivucica commented Apr 14, 2020

Copy link
Copy Markdown
Member Author

@slp It looks like I can't directly assign you this review (presumably because you were not added to the GH org, not sure).

However, your input is required for the changes to the headers. Has the copyright been assigned and may I change the headers as visible in my commits?

This now results in windows being painted on the screen. However, input is
still ending up in all the wrong places, and there is a lot of garbage content
being painted outside the actual windows.

Right clicking on a window seems to trigger rotate behavior, which needs to
be evaluated and likely removed (or prevented, if this is done by Weston).

Interestingly, checking for ->configured on first surface commit also seems to
break the backend.
@ivucica

ivucica commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

In 41b2d29 I managed to get stuff to paint by not committing the surface unless we first received a configure request and have acked it. Not doing this is against the protocol, and Weston actively drops the connection if we do this.

Only updating one location for wl_surface_commit(), the one in WaylandCairoSurface(), does the trick; in the other location, apparently we are supposed to commit this surface, even if unconfigured.

We still get a lot of garbage, and behavior is generally very broken when it comes to input and clicking around.

Here's SystemPreferences.app:

image

Here's Calculator.app:

image

@ivucica

ivucica commented Apr 17, 2020

Copy link
Copy Markdown
Member Author

Some resources for understanding that commit:

ivucica added 4 commits April 25, 2020 16:14
… informative.

The exception was not very informative about why exactly the
error message may occur. Weston in Debian buster doesn't
support the stable XDG Shell protocol, for instance, and
triaging this took some effort.
@ivucica

ivucica commented Apr 25, 2020

Copy link
Copy Markdown
Member Author

@fredkiefer Would you like to take a final look at this before we merge this? As we agreed, we should merge it in its incomplete and broken state.

If you LGTM this, I'll rebase as necessary and push to the main branch, updating any dates as required. Let me know.

@fredkiefer fredkiefer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We both agree as long as this does not break any other backend it is OK to merge, Hopefully someone will pick up the code from there.

@ivucica ivucica merged commit 4ab5a69 into gnustep:master Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants