On Wed, Nov 09, 2016 at 10:30:45AM +0100, Jan Synacek wrote: > Hello, > > I'm playing around with libwayland-client, implementing a simple > application. I made the middle mouse button move the "window" using > wl_shell_surface_move() when the button is pressed, which works. What > I don't understand, though, is how do I make the compositor position > the "window" when it's created? I would like to position it somewhere > else than 0,0 in monitor coordinates.
There is currently no protocol for hinting about how a surface should be positioned. There most likely will not be a protocol that has "place me at (x, y)" but rather more like "center me", "restore previous position" or something more high level like that. > > Additionally, are clients expected to draw their decorations? If yes, > does that mean creating subsurfaces that respond to pointer events? With wl_shell and xdg_shell, then yes. You can do it however you want, either like Qt and GTK+ by simply drawing both the frame and the content one single surface, or by using multiple surfaces, combining them using wl_subcompositor to form a single "window". Jonas > > Cheers, > -- > Jan Synacek > Software Engineer, Red Hat > _______________________________________________ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel