Code review comment for lp://qastaging/~saviq/unity-2d/unmaximize-on-drag

Revision history for this message
MichaƂ Sawicz (saviq) wrote :

> > - The code you added to ClosedMenuBarHelper should be in MenuBarWidget: I
> > would like ClosedMenuBarHelper to remain a small helper class to notice when a
> > menu in the menubar is closed.
>
> For some reason I didn't get the events in MenuBarWidget, but now you
> mentioned it they obviously should happen there. Maybe that's even the cause
> of the Hover events getting lost.

I'm probably missing something obvious, but I'm not getting any mouse events on MenuBarWidget. MenuBarClosedHelper is installed as a filter event for MenuBarWidget, but that shouldn't prevent the latter to receive events as long as the filter doesn't return true, should it?

> > - I am worried with r564: it looks like a duplication of the code you added in
> > MenuBarWidget. Maybe it is possible to do most of the work from MenuBarApplet?
>
> Yes it definitely is duplication that I disliked, too. IMO there should simply
> be a 'QDragEvent' available that does the heavy lifting. Since the widgets
> alternate in visibility, what approach do you propose to get rid of that?

We could probably install MenuBarWidget as an event filter on AppNameApplet?

« Back to merge proposal