[PATCH weston 2/3] text: Don't track binding in struct text_backend

Bryce Harrington bryce at osg.samsung.com
Thu Sep 24 13:52:07 PDT 2015


On Wed, Sep 23, 2015 at 10:27:42AM -0500, Derek Foreman wrote:
> On 17/09/15 03:45 PM, Bryce Harrington wrote:
> > On Thu, Jun 25, 2015 at 03:49:48PM -0500, Derek Foreman wrote:
> >> The binding is only used for preventing launch, and we've already got the
> >> pid for that.
> >>
> >> With multiple seats there are multiple bindings, so if the most recent
> >> binding unbinds it will clear the pointer, so using it like this is risky
> >> anyway.
> > 
> > Ok, if I understand it, you're saying that basically checking for
> > text_backend->input_method.binding in launch_input_method() is redundant
> > text_backend->with:
> > 
> >         if (text_backend->input_method.process.pid != 0)
> > 	   return;
> > 
> > And since nothing else here needs text_backend->input_method.binding we
> > can just drop it entirely.
> 
> Right.
> 
> > Seems reasonable and sensible to me.  Just in case, would like to wait
> > on landing until after the release.
> 
> Seems prudent. :)
> 
> > Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

Now that we're post-release, series is pushed:

remote: I: patch #52833 updated using rev b4bacd258dac3e1cbad6321ceea61607bd893937
remote: I: patch #52835 updated using rev e821ce6869e375905655b49e113984e2b684e204
remote: I: patch #52834 updated using rev 89dcea9b58fa7f2fcda3108c024d699be8a334e3
remote: I: 3 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/wayland/weston
   e7d868a..89dcea9  master -> master

Bryce

> >> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> >> ---
> >>  src/text-backend.c | 9 ---------
> >>  1 file changed, 9 deletions(-)
> >>
> >> diff --git a/src/text-backend.c b/src/text-backend.c
> >> index 397c51b..59011c8 100644
> >> --- a/src/text-backend.c
> >> +++ b/src/text-backend.c
> >> @@ -100,7 +100,6 @@ struct text_backend {
> >>  
> >>  	struct {
> >>  		char *path;
> >> -		struct wl_resource *binding;
> >>  		struct weston_process process;
> >>  		struct wl_client *client;
> >>  
> >> @@ -830,12 +829,9 @@ static void
> >>  unbind_input_method(struct wl_resource *resource)
> >>  {
> >>  	struct input_method *input_method = wl_resource_get_user_data(resource);
> >> -	struct text_backend *text_backend = input_method->text_backend;
> >>  
> >>  	input_method->input_method_binding = NULL;
> >>  	input_method->context = NULL;
> >> -
> >> -	text_backend->input_method.binding = NULL;
> >>  }
> >>  
> >>  static void
> >> @@ -869,8 +865,6 @@ bind_input_method(struct wl_client *client,
> >>  	wl_resource_set_implementation(resource, NULL, input_method,
> >>  				       unbind_input_method);
> >>  	input_method->input_method_binding = resource;
> >> -
> >> -	text_backend->input_method.binding = resource;
> >>  }
> >>  
> >>  static void
> >> @@ -954,9 +948,6 @@ handle_input_method_sigchld(struct weston_process *process, int status)
> >>  static void
> >>  launch_input_method(struct text_backend *text_backend)
> >>  {
> >> -	if (text_backend->input_method.binding)
> >> -		return;
> >> -
> >>  	if (!text_backend->input_method.path)
> >>  		return;
> >>  
> >> -- 
> >> 2.1.4
> >>
> >> _______________________________________________
> >> wayland-devel mailing list
> >> wayland-devel at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list