GithubHelp home page GithubHelp logo

Comments (7)

Consolatis avatar Consolatis commented on June 17, 2024 1

Thanks for reporting and the confirmation!
I will write up the PR with the quick and dirty option for now (unless you want to instead?).

from labwc.

jp7677 avatar jp7677 commented on June 17, 2024 1

unless you want to instead?

I can do that, just give me a minute.

from labwc.

Consolatis avatar Consolatis commented on June 17, 2024 1

:)

PS: Being able to run labwc nested is so convenient for gathering this kind of information!

And yes, absolutely! Having to restart the main DRM session all the time during development or debugging would be a nightmare for me.

from labwc.

johanmalm avatar johanmalm commented on June 17, 2024 1

Thanks @jp7677
Really nice to get this fix in before the release.

from labwc.

Consolatis avatar Consolatis commented on June 17, 2024

Hm.. so surface->parent is != NULL but it seems ->data is. Hrm.
Could you add something like wlr_log(WLR_ERROR, "parent: %p", parent); in there?

Edit:
I assume what is happening here is that the parent of the managed X11 surface is in fact an unmanaged X11 surface which doesn't set the ->data pointer as doesn't have a view. So if the wlr_log() indeed confirms parent to be NULL we have two options:

  • the quick and dirty one: just modifying the return to if (!parent || !parent->toplevel.handle)
  • the proper one: loop through all parents until we find a toplevel handle or the parent is NULL

As we actually intended to release today I'd be fine with the quick and dirty one if its confirmed that it fixes the crash.
CC @johanmalm @jlindgren90

from labwc.

jp7677 avatar jp7677 commented on June 17, 2024

Adding the log statement indeed confirms what you wrote:

[../src/xwayland.c:546] parent: (nil)

from labwc.

jp7677 avatar jp7677 commented on June 17, 2024

Using above quick fix does indeed fixes the segfault. The settings window also opens after the click.

diff --git a/src/xwayland.c b/src/xwayland.c
index b109b1f..0c44b7c 100644
--- a/src/xwayland.c
+++ b/src/xwayland.c
@@ -543,7 +543,7 @@ init_foreign_toplevel(struct view *view)
                return;
        }
        struct view *parent = (struct view *)surface->parent->data;
-       if (!parent->toplevel.handle) {
+       if (!parent || !parent->toplevel.handle) {
                return;
        }
        wlr_foreign_toplevel_handle_v1_set_parent(view->toplevel.handle, parent->toplevel.handle);

from labwc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.