questions about gtk simple applications running on wayland

Zhao, Juan J juan.j.zhao at
Thu Oct 27 01:14:44 PDT 2011

Some updates for this question.
In gtk side, if I run "wl_shell_set_toplevel" once the surface is created by "wl_compositor_create_surface", everything is OK.
But later, gtk application will bind some image to this surface. And then call "wl_shell_set_toplevel".

In the server side, the function shell_set_toplevel's third parameter is only "wl_buffer" but not "wlsc_surface".
The server used some point which is not for wlsc_surface, and then, random result shows: like the height and width is too big....
Any thoughts?

*^_^* BRs,

From: at [ at] On Behalf Of Zhao, Juan J
Sent: Thursday, October 27, 2011 9:26 AM
To: wayland-devel at
Subject: questions about gtk simple applications running on wayland

Hey there,
       These days, I'm trying to run some simple gtk applications on wayland.
       I built gtk, and fix some mismatched wayland interface. But there are still some problems.
       It is announced that gtk applications can run on X11 backend wayland compositor. So I choose this backend at first.
       Simple wayland client demos can run OK. But when running gtk applications, I will find that server will meet segment fault.
       The segment fault is directly caused by shell_set_toplevel->wlsc_surface_damage->wlsc_surface_damage_rectangle->pixman_region32_union_rect. The width and height is more than 10,000+.
       Looks like some boundaries check should be added here. Because the server should not crashed by some unhealthy clients.
And maybe we can still send some message to the client:"Hey, you did something wrong...and I will ignore your request"

Obviously, this is not the root cause. I went on track the shell_top_level's resource. This resource is inserted to wl_map by bind_shell.
There are something strange here. When adding these resource, it is a kind of wl_shell resource. But when using it in shell_set_toplevel, it become a wlsc_surface resource....
Did I misunderstand something here? Any thoughts for me for going ahead to fix this problem to the root cause?

*^_^* BRs,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wayland-devel mailing list