gnustep / libs-back

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
http://www.gnustep.org
GNU General Public License v3.0
50 stars 34 forks source link

Wayland #17

Closed ivucica closed 4 years ago

ivucica commented 4 years ago

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 commented 4 years ago

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

ivucica commented 4 years ago

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 commented 4 years ago

@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?

ivucica commented 4 years ago

In https://github.com/gnustep/libs-back/pull/17/commits/41b2d294ed7393a5331c3aefa205fad41fabd502 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 commented 4 years ago

Some resources for understanding that commit:

ivucica commented 4 years ago

@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.