[PATCH weston] xwm: don't set inactive surfaces as top level
Bryce Harrington
bryce at osg.samsung.com
Fri Jan 23 18:30:39 PST 2015
On Mon, Jan 19, 2015 at 05:57:43PM -0800, Bill Spitzak wrote:
>
>
> On 01/12/2015 09:14 AM, Giulio Camuffo wrote:
>
> >+static bool
> >+weston_wm_window_inactive(struct weston_wm_window *window)
> >+{
> >+ struct weston_wm *wm = window->wm;
> >+
> >+ return window->type == wm->atom.net_wm_window_type_tooltip ||
> >+ window->type == wm->atom.net_wm_window_type_dropdown ||
> >+ window->type == wm->atom.net_wm_window_type_dnd ||
> >+ window->type == wm->atom.net_wm_window_type_combo ||
> >+ window->type == wm->atom.net_wm_window_type_popup;
> >+}
>
> I think maybe this should be called "window_type_inactive" because
> the current name implies this is some kind of check for whether the
> window is "currently inactive".
Agreed, that would perhaps have a clearer meaning.
> Also is it necessary to namespace
> the static function with "weston_wm_" prefix?
Probably not for static functions however nearly all the functions in
this file are named that way so for consistency's sake it should follow
suit.
So, the function should be renamed to,
weston_wm_window_type_inactive()
Which seems unweildy but we already have weston_wm_create_wm_window(),
weston_wm_get_visual_and_colormap(), etc. so I don't think that's an
issue.
Bryce
More information about the wayland-devel
mailing list