Refactor the current menu code to support both window selection
and "normal" menu items. Add a "New Window" item which does what
you'd expect.
Clean up the way we handle highlighting the window items to be
more direct; rather than looping over all items in most cases,
just directly manipulate one item
https://bugzilla.gnome.org/show_bug.cgi?id=594557
There are few uses for being able to exit the shell directly; my
current one is that the gtype debug infrastructure is implemented
as an atexit() handler.
This isn't a long-term solution; what we really want is for Alt-F2 to
just be an application search with a hack to detect shell commands,
but in the short term this allows us to run the magic 'lg' command
from the overview.
https://bugzilla.gnome.org/show_bug.cgi?id=595116
Rename beginModal/endModal to pushModal/popModal. All of the current callers
just want to ensure that we're in a modal state; they don't actually need to
fail if we already are.
These functions also now take the Clutter keyboard focus, while recording
the previous focus.
https://bugzilla.gnome.org/show_bug.cgi?id=595116
When we had a filtered set of windows, and want to exit the overview
into a particular window, what we do is re-show all the old windows
first, but don't reset the scaling on them. This will involve
some overlapping, but that's not a big deal because we'll immediately
get overlap anyways in the normal case zooming the windows back.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.
Also, allow the user to mouse over the actual windows and select
them directly. If the user mouses over a window, reflect that in
the menu.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
Callers will generally expect _popup and _popdown to be a no-op if
the menu is already in that state; make it so.
Also change the 'popdown' signal to be 'cancelled'; this is
clearer and allows us to avoid having activate also call popdown.
https://bugzilla.gnome.org/show_bug.cgi?id=594699
There are ton of different kinds of mouse even handlers in the overview;
WindowClone has several mouse-enter/leave handlers, we still have a variety
of classes not ported to ButtonBox and so incorrectly handling double-click,
etc.
Since we at present don't have anything in the overview area for which
it makes sense to interact with during the animation, create a transparent
event-eating box which we raise to the top during the animation.
https://bugzilla.gnome.org/show_bug.cgi?id=594074
controls if there is only one page of results
This makes the search results display more streamlined.
Make sure that we move the selection to a different section if we are going
from displaying a single section to displaying all and the section that
used to be displayed alone doesn't have any results.
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.
Also, allow the user to mouse over the actual windows and select
them directly. If the user mouses over a window, reflect that in
the menu.
We will be adding more search results sections, so we should store the intended
order of the search results sections and their properties in an array of data
structures.
This information allows us to have generic code for creating the search results
sections, moving the selection between them and transitioning between showing
all sections and a single section.
Rather than starting lightboxing only when the mouse enters the
menu, start it when an application filter is set.
Also delete a stale function in WindowClone from previous work.
http://bugzilla.gnome.org/show_bug.cgi?id=594555
Before Clutter gained accessors for event information, we had
shell_global_ functions. Now that Clutter has them, use them and
delete the ShellGlobal code.
http://bugzilla.gnome.org/show_bug.cgi?id=594561
Show the errors to the user instead of silently logging them to the terminal,
also rework positioning to get rid of magic numbers.
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
http://bugzilla.gnome.org/show_bug.cgi?id=593840
When we have multiple windows for an application, implement the following
behavior:
* On click + immediate release, go to the most recently used
* On click, hold for 0.6s, pop up a menu with windows, filtering
the window list to just those windows.
Mouse over on the window list highlights the moused-over window.
Implement this by splitting well item into InactiveWellItem
and RunningWellItem, sharing a base class BaseWellItem.
Checking if an item is under the pointer by calling stage.get_actor_at_pos()
synchronously will trigger a too-early allocation of the stage. Use an idle
at Meta.PRIORITY_BEFORE_REDRAW. (Before 553503d it was using a 5 msec timeout,
553503d made it synchronous.)
http://bugzilla.gnome.org/show_bug.cgi?id=592608
Display the mounted volumes in the places section of the overlay.
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Colin Walters <walters@verbum.org>
For some use cases we have other behavior on mouse press and want
to manually control when a drag starts. Split out the drag initiation
code into startDrag.
There is no need to show two headers when we are only displaying a single
section of search results, so we merge the section header with the main
header in that case.
Show a back button on the left of the main header to get back to the results
for all sections.
Remove this._showTooltip flag from SearchSectionHeader because we no longer
show this type of header when we want to suppress the tooltip.
Add this._appSearchResultsOnlyShown and this._docSearchResultsOnlyShown
flags to track when a single section is shown more cleanly.
We no longer need the timeout for checking if an item is drawn under
the pointer because we display search results in the main pane and there is
no lowering/raising of other overview actors going on as the results are
being displayed.
Select an item by default when the search results are displayed.
Enable moving from one section of search results to another with key navigation.
Reset the selection when the search is updated or a new page is displayed
or the transition between viewing multiple sections and viewing just one is made.
The windows we considered for both the app monitor and the overview
workspaces were the same, but the code was duplicated once in C, once
in Javascript.
Make Button class purely about adding visuals, and use ShellButtonBox
for behavior. API equivalences:
shell.button => shell.actor [for consistency]
staysPressed parameter to constructor => replaced by manually setting
the 'active' property of button.actor as appropriate
pressIn/release => button.actor.active = true/false
enter-event/leave-event signals => button.actor notify::hover
Along the way, this fixes a bug with the user status menu where it was
not getting set to active because the button was getting a leave
(triggered by the menu popping up and grabbing the pointer) before for
button release, which disabled the staysPressed behavior.
Reported by Michael Meeks
http://bugzilla.gnome.org/show_bug.cgi?id=593471
Use bigger font and brighter color for the search results section headers.
Add more padding.
Display "(see all)" tooltip in the section headers on mouse-over.
(Still TODO: supressing that tooltip when all results are already being shown.)
All our font sizes were in px, other than the size for the text in
the search entry. Switch that from 12 to 16px (which is the same size
at the standard 96dpi), it doesn't become out of scale if the DPI
is different. (Using fixed px sizes isn't probably what we want to
do in the long term; moving to style sheets will be a good place to
fix that. But better to be consistent.)
http://bugzilla.gnome.org/show_bug.cgi?id=593212
When we are modal, examine keypresses and look for:
- 'Print': Run the screenshot command in any mode; very useful for
bug filing, reviews, etc.
- Release of Super_L/Super_R - if in the overview, toggle back
out of the overview.
http://bugzilla.gnome.org/show_bug.cgi?id=593427
shell-global.[ch]: Add shell_global_display_is_grabbed() that
uses the newly added meta_display_get_grab_op() to check
for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
check if the menu is popped up. Check for active grabs before
popping the menu up. Use gtk_menu_popdown() rather than
gtk_widget_hide(). Remove an excess gtk_widget_show() and
some excess casts.
panel.js: Check whether the status menu is popped up after button
release, and if it's not popped up, unhighlight the button.
Reported by Nuno Donato
http://bugzilla.gnome.org/show_bug.cgi?id=593362