[Wayland-bugs] [Bug 719819] Wayland backend depends on ordering of globals in the display server
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Mon May 18 21:26:41 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=719819
Matthias Clasen <mclasen at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mclasen at redhat.com
--- Comment #10 from Matthias Clasen <mclasen at redhat.com> ---
(In reply to Jonas Ã…dahl from comment #6)
> (In reply to Matthias Clasen from comment #5)
> > Review of attachment 303510 [details] [review] [review]:
> >
> > ::: gdk/wayland/gdkdisplay-wayland.c
> > @@ +366,3 @@
> > + if (handled)
> > + g_hash_table_insert (display_wayland->known_globals,
> > + GUINT_TO_POINTER (id), g_strdup (interface));
> >
> > Given that the one use for this hash table is to look up globals by their
> > interface, wouldn't it make more sense to flip this around, and make the
> > interface name the key ? Then you can actually use the hash table as it was
> > meant to be used: by doing lookups, instead of iterating over it...
>
> There may be more than one global per interface name (multiple seats,
> multiple outputs), so we wouldn't know how to delete if we didn't use the id
> as key. We could, I suppose, change it to ignore that globals may be
> removed, since we only use this during initialization anyway.
I see, so it is really just a list of globals. I guess we could store it as a
plain list of struct { global; interface} or make the interface name the key
and store a list of globals. But given that the list of globals is small and
essentially fixed, we could also just leave it as it is.
A comment would be useful, though
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150519/4e638961/attachment.html>
More information about the wayland-bugs
mailing list