questions about gtk simple applications running on wayland

Zhao, Juan J juan.j.zhao at intel.com
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,
Juan


From: wayland-devel-bounces+juan.j.zhao=intel.com at lists.freedesktop.org [mailto:wayland-devel-bounces+juan.j.zhao=intel.com at lists.freedesktop.org] On Behalf Of Zhao, Juan J
Sent: Thursday, October 27, 2011 9:26 AM
To: wayland-devel at lists.freedesktop.org
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,
Juan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20111027/db173f33/attachment-0001.html>


More information about the wayland-devel mailing list