Commit Graph

2111 Commits

Author SHA1 Message Date
Mario Sanchez Prada
9b69a45eee Update gvc submodule to the latest commit from master
This avoids unnecessary calls to match_card_port_with_existing_device()
when connecting to a bluetooth device from the shell's top panel.

https://bugzilla.gnome.org/show_bug.cgi?id=752675
2015-07-21 16:11:01 +01:00
Jasper St. Pierre
7424ee755a shell-app: Stay consistent about application states
When the last interesting window of an app-backed window is removed,
we'll transition it back to STOPPED, but we transition the state and
send out the signal before we clear the running state.

This means that any listeners to the state-changed signal might
encounter a window-backed app that has a running state, but no
windows. If they call, e.g. shell_app_get_name, while in this state,
they'll encounter an assertion fail.
2015-07-16 17:09:39 -07:00
Jasper St. Pierre
ff664fd1d8 shell-app: Track the starting state correctly
Apps that are starting might have uninteresting windows like splash
screens pop up and then go away (like LibreOffice), even when
startup-notification hasn't completed yet. In those cases, we don't
want to transition the app back to stopped -- it should remain in
the running state.
2015-07-16 15:21:57 -07:00
Jasper St. Pierre
7305466765 Adapt to new size-change API
We don't implement any maximize transitions (yet??), but we still have
the skeleton there. Let's keep it up to date.
2015-07-05 23:09:24 -07:00
Florian Müllner
eac303f84c app-system: Improve StartupWMClass heuristics
Our StartUpWMClass heuristics use a StartupWMClass -> .desktop ID
mapping built from the list of all installed applications. In case
of multiple .desktop files setting the same StartupWMClass, we
currently simply pick the last one returned by g_app_info_get_all (),
which can be a bit surprising:
A window with WM_CLASS 'emacs', launched through a .desktop file
named 'emacs.desktop' with a StartupWMClass of 'emacs' maps to ...
'emacsclient.desktop'!
Make this case a bit less random by preferring the app info whose
ID matches the StartupWMClass.

https://bugzilla.gnome.org/show_bug.cgi?id=751541
2015-06-26 19:21:46 +02:00
Florian Müllner
52e3149040 main: Replace deprecated g_settings_list_keys() 2015-06-19 14:05:32 +02:00
Florian Müllner
ad297ea9dc main: Fix a memory leak
We are pointlessly calling g_settings_list_keys() twice, without
freeing the result from the first call.
2015-06-19 14:05:32 +02:00
Wim Taymans
2015fc97dc shell-recorder-src: rework queue handling
Use our own locking and queue instead of async_queue.
Implement unlock and unlock_stop to make the create function return
FLUSHING. This is important to be able to pause the pipeline after some
error occured in the pipeline.
Implement start/stop to clear the queue and its state.
2015-06-16 09:03:30 +02:00
Watson Yuuma Sato
59a18c4ead ShellKeyringPrompt: Strip out mnemonics indicators from labels
Currently GNOME Shell doesn't support mnemonics and prompters may
send labels with it.

Remove the mnemonics indicator for now.

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fixed style issue

https://bugzilla.gnome.org/show_bug.cgi?id=750465
2015-06-09 11:45:47 +02:00
Ting-Wei Lan
249619fabd build: Fix the path of perl for data-to-c.pl
https://bugzilla.gnome.org/show_bug.cgi?id=749490
2015-05-22 19:03:44 +08:00
Florian Müllner
86e04048ff st: Remove StTable
Alas, the last use of StTable is not gone, so we can finally remove
our copy of the widget.

https://bugzilla.gnome.org/show_bug.cgi?id=703833
2015-05-05 16:37:41 +02:00
Rui Matos
4f703019ca shell-global: Mark the sync pointer motion event as synthetic
This allows mutter to ignore these events for the purpose of keeping
idle time.

https://bugzilla.gnome.org/show_bug.cgi?id=748541
2015-04-27 19:47:39 +02:00
Ting-Wei Lan
e4718d3f7f shell_global_reexec_self: add support for FreeBSD
https://bugzilla.gnome.org/show_bug.cgi?id=747788
2015-04-15 02:50:19 +08:00
Rui Matos
5afd04781c keyboard: Add a way to use the OSK on shell chrome in wayland sessions
libcaribou was designed to generate X events which works under wayland
sessions for X clients but obviously doesn't work for wayland clients
and for shell chrome.

This patch adds a simple caribou display adapter which inherits from
its X display adapter and allows us to continue to work for X clients
and at the same time makes the OSK work on shell text entries by
sending key events directly to the focused text actor.

Making the OSK work for wayland clients requires much bigger changes
at various levels in the stack and either not using libcaribou or
re-working it substantially so that's left for future work.

https://bugzilla.gnome.org/show_bug.cgi?id=747274
2015-04-14 19:34:13 +02:00
Owen W. Taylor
92667e3b7f gtkactionmuxer.c: Pass the platform data when activating actions as well
The code from a6a2cea414 only passed a timestamp when changing an action
state, but the timestamp also to be passed when activating actions.

https://bugzilla.gnome.org/show_bug.cgi?id=747323
2015-04-07 10:44:55 -04:00
Owen W. Taylor
a0632e3e02 Unrevert gtkactionmuxer: Reintroduce the passing of event timestamps
Fix an accidental revert of a6a2cea414 - a patch that hacked
the cut-and-pasted code from GTK+ to pass timestamps when activating
remote actions.

https://bugzilla.gnome.org/show_bug.cgi?id=747323
2015-04-07 10:26:34 -04:00
Rui Matos
216e996f66 st-theme-node: Unconditionally apply style margins on the actor
We currently don't have any code either in gnome-shell or
gnome-shell-extensions setting margins directly with the Clutter API.

On the other hand, the current behavior doesn't allow us to remove a
style class with margins and have that be reflected, so removing this
special casing seems like the right thing to do at this point.

https://bugzilla.gnome.org/show_bug.cgi?id=746902
2015-03-27 18:06:13 +01:00
Rui Matos
c3bf4a325d Refresh all background instances after suspend if needed
NVIDIA drivers don't preserve FBO contents across suspend / resume
cycles which results in broken backgrounds. We can work around that by
forcing a refresh when coming out of suspend.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2015-03-24 11:45:04 +01:00
Florian Müllner
169b00aa64 gtk-embed: Handle unmap/map of the embedded window
The current code assumes that an embedded window will correspond to
a single MetaWindow over the entire lifetime of the icon, which is
incorrect - the embedded window is unmanaged on Unmap and a new
MetaWindow will be created the next time the embedded window is
mapped. As we currently ignore the new MetaWindow completely, it
will be shown normally in the scene instead of the embedded clone
as intended.
Fix this by setting up clone and window actor each time the embedded
window is mapped rather than once in shell_gtk_embed_set_window().

https://bugzilla.gnome.org/show_bug.cgi?id=745824
2015-03-22 09:33:33 +01:00
Florian Müllner
f0c0687b43 gtk-embed: Fix typo in comment 2015-03-20 02:32:01 +01:00
Cosimo Cecchi
f812e9be7d ShellApp: use st_icon_set_fallback_icon_name() to specify app fallback
We can now safely pass a NULL GIcon to st_icon_set_gicon(), and specify
a more generic fallback using the new API we just introduced.

https://bugzilla.gnome.org/show_bug.cgi?id=746219
2015-03-14 17:31:07 -07:00
Cosimo Cecchi
c7185d597b StIcon: add a fallback-icon-name property
This can be used when the lookup for the specified icon fails, in case
the client doesn't want an empty texture.

https://bugzilla.gnome.org/show_bug.cgi?id=746219
2015-03-14 17:31:07 -07:00
Florian Müllner
8aeebbbf78 calendar-server: Give each event an unambiguous ID
Each event returned by GetEvents includes the (currently unused)
UID, which is not always enough to unambiguously identify an event
(different calendar sources, recurring events, ...).
As we will start using the property to record events that have been
dismissed and should be persistently hidden from the calendar, change
it to a truly unique ID.

https://bugzilla.gnome.org/show_bug.cgi?id=744927
2015-03-13 15:53:41 +01:00
Matthias Clasen
0ebba112d7 Fix the offset calculation again
We also need to skip over the \004.

https://bugzilla.gnome.org/show_bug.cgi?id=745521
2015-03-04 10:19:55 -05:00
Rui Matos
b58f08bda1 viewSelector: Don't reset the search entry if it has preedit text
If users click outside the search entry while it's empty we reset and
thus give up key focus. This means that when using an input method
with candidate popups, interacting with the popup with a mouse click
cancels the current input method context if there's no other text in
the entry besides the preedit string.

To avoid this we can check if the entry has preedit in addition to
checking if it has normal text.

https://bugzilla.gnome.org/show_bug.cgi?id=745167
2015-03-04 15:25:35 +01:00
Matthias Clasen
3ec764d584 Fix offset calculation for g_dpgettext
We need to pass a positive number here.

https://bugzilla.gnome.org/show_bug.cgi?id=745521
2015-03-04 08:37:52 -05:00
Giovanni Campagna
707cc9e315 TelepathyClient: stop handling room invitations
Let empathy deal with these

https://bugzilla.gnome.org/show_bug.cgi?id=745503
2015-03-03 14:20:48 -08:00
Giovanni Campagna
fab25e18da TelepathyClient: remove call and file transfer approval
Let empathy deal with these.

https://bugzilla.gnome.org/show_bug.cgi?id=745503
2015-03-03 14:20:48 -08:00
Giovanni Campagna
38a2f26e44 TelepathyClient: remove subscription request notifications
The ones handled by empathy are just fine

https://bugzilla.gnome.org/show_bug.cgi?id=745503
2015-03-03 14:20:48 -08:00
Florian Müllner
f85d68aa70 util: Filter out message context of untranslated strings
Commit 5a47ad837b changed the definition of NC_() to include the
message context, so that gettext can correctly disambiguate strings
like "S". However this does only work when gettext actually returns
a translation from the catalogue; if the string is not found, we
need to strip the context again to not have it show up in the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=745521
2015-03-03 17:19:34 +01:00
Raul Gutierrez Segales
7d058901ef Update comment about the pipeline used
We now use webm instead of theora so the previous
comment doesn't apply anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=652742
2015-02-27 17:36:11 +01:00
Florian Müllner
c9bcb411fc windowManager: Add unminimize effect
The effect was added to mutter a while ago, but never implemented
in the shell. Just do the reverse of the minimize animation ...

https://bugzilla.gnome.org/show_bug.cgi?id=702662
2015-02-27 13:02:19 +01:00
Florian Müllner
890a809022 Drop MESSAGE_TRAY action mode
The mode is never set after the removal of the bottom tray, so it
no longer makes sense to pass it to allowKeybinding(). We can also
safely remove it from the ActionModes flags altogether without
requiring a synchronized update with gnome-settings-daemon, as
the latter never used any flag value above LOGIN_SCREEN.
2015-02-26 01:41:18 +01:00
Cosimo Cecchi
5bdaffd36e st-private: fix cogl orthographic projection matrix
Commit 1c1f63a7d7 changed the shadow
pipeline to use cogl_framebuffer_ortographic() instead of cogl_ortho(),
but the two functions take their arguments in a different order.

Fixes graphical corruption for text shadows in the login screen.

https://bugzilla.gnome.org/show_bug.cgi?id=745061
2015-02-23 16:42:21 -08:00
Florian Müllner
c79d24b60e popupMenu: Use TOPBAR_POPUP action mode for all menus
When it comes to keybindings or gestures, there's not really a good
reason why popups associated with the top bar should behave differently
from any other shell menus. Just set the action mode generically for
all menus, so actions like screenshots or media-keys start working
with menus like the background- or app launcher context menus.

https://bugzilla.gnome.org/show_bug.cgi?id=745039
2015-02-23 21:39:22 +01:00
Giovanni Campagna
07664e7d2f St: draw the actor at full opacity when creating shadow material
When creating the shadow, we should ignore the opacity set on the
actor and its parent, as it will be applied again at a later stage.

https://bugzilla.gnome.org/show_bug.cgi?id=677412
2015-02-20 17:46:50 -08:00
Jasper St. Pierre
af4e84383d shell-plugin: Remove unused variables 2015-02-20 17:41:19 -08:00
Jasper St. Pierre
1c1f63a7d7 st-private: Update shadow APIs for Cogl deprecations 2015-02-20 17:40:46 -08:00
Jasper St. Pierre
8dab692f93 st-box-layout: Fix Cogl deprecations 2015-02-20 17:40:46 -08:00
Jasper St. Pierre
4de20272e5 shell-invert-lightness-effect: Fix Cogl deprecations 2015-02-20 17:40:46 -08:00
Jasper St. Pierre
ad75739fc5 st-drawing-area: Fix Cogl deprecations 2015-02-20 17:40:45 -08:00
Jasper St. Pierre
1d23539576 theme-node: Add more information to length error message 2015-02-20 17:40:45 -08:00
Jasper St. Pierre
71ae7e69c5 shell-app: Remove leftover struct 2015-02-20 17:40:45 -08:00
Carlos Soriano
ef3285d5e7 shell-app: Remove shell_app_get_faded_icon
In previous commit we removed the only use of shell_app_get_faded_icon
so we can remove the function on shell-app as well.

https://bugzilla.gnome.org/show_bug.cgi?id=744680
2015-02-20 15:14:44 +01:00
Carlos Soriano
e71b0a57fb remove shell-slicer
In last commit we remove the only use of shell-slicer, so we can remove
this as well
2015-02-20 15:14:44 +01:00
Sebastian Dröge
c4a775e94a shell-recorder: Timestamp buffers from the pipeline clock, not the wall clock
This should give more accurate timestamps on the video buffers, and especially
keep A/V sync when audio is also recorded.

https://bugzilla.gnome.org/show_bug.cgi?id=744642
2015-02-19 10:21:19 +02:00
Florian Müllner
7aa75f8eb0 calendar-server: Bump dataserver version
Evolution-data-server bumped its DBus API, so it's update time
for us ...

https://bugzilla.gnome.org/show_bug.cgi?id=744665
2015-02-17 17:31:08 +01:00
Florian Müllner
625a38f605 shell: Shut up a compiler warning 2015-02-17 12:34:06 +01:00
Colin Walters
4da7f20759 Drop use of libgsystem, move single API call into shell-global.c
See https://mail.gnome.org/archives/desktop-devel-list/2015-February/msg00121.html

We presently only indirectly link to it via this one call; until GLib
gains structured logging, simply import the code to wrap the journal
logging in an introspectable API into Shell.

https://bugzilla.gnome.org/show_bug.cgi?id=744457
2015-02-13 04:59:40 -05:00
Jasper St. Pierre
39d3ff6caf run-js-test: Remove old code to shove X11 events through 2015-02-11 16:31:26 -08:00
Jasper St. Pierre
513d1a195d recorder: Remove unused field 2015-02-11 01:00:11 -08:00
Jasper St. Pierre
d54b87c455 screenshot: Use MetaCursorTracker to fetch the cursor position
ClutterInputDevice will use the last place it knows the cursor to be,
which isn't always up to date when running under X11.
2015-02-11 01:00:11 -08:00
Cosimo Cecchi
12b00501cc StTextureCache: do not monitor files inside GResource
This is wasteful, since GResource does not support file monitoring.
Further, doing so will trigger a fallback code path in GLib that polls
every second in a thread, which is doubly wasteful.

https://bugzilla.gnome.org/show_bug.cgi?id=744013
2015-02-04 13:18:49 -08:00
Florian Müllner
21056a967f Revert "shell-app: Fix typo"
This reverts commit ead4c2b863.
2015-01-30 18:01:57 +01:00
Florian Müllner
ead4c2b863 shell-app: Fix typo
Commit 086fcd4a32 broke the build, use the correct variable to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=743729
2015-01-30 17:59:30 +01:00
Jasper St. Pierre
086fcd4a32 shell-app: Only raise windows on the same workspace when activating them
For some reason, we never did this, even though this is what the comment
says we should be doing.
2015-01-30 11:36:45 -05:00
Jasper St. Pierre
9f5a2d8aca Remove the dependency on XTest
We haven't been using XTest since edd66c4.
2015-01-18 16:49:36 -08:00
Adel Gadllah
76315fca9f shell-screenshot: Disable unredirection while taking screenshots
Otherwise we grab wrong contents.

https://bugzilla.gnome.org/show_bug.cgi?id=741114
2015-01-13 19:44:03 +01:00
Rui Matos
af889168f0 StTextureCache: adapt to MetaWindow changing icon prop type
Mutter change is
https://git.gnome.org/browse/mutter/commit/?id=af7f51b992b20da543312fa9fdf1dcef39704b37

https://bugzilla.gnome.org/show_bug.cgi?id=742824
2015-01-13 15:58:45 +01:00
Adel Gadllah
538272bb23 recorder: Cleanups 2015-01-11 15:48:05 +01:00
Adel Gadllah
985e909876 recorder: Don't compute the buffer size twice 2015-01-11 15:42:38 +01:00
Adel Gadllah
d183f13456 recorder: Switch to vp9
Currently we have been using the vp8 codec because it was the best unencumbered codec at that time. With vp9 we now have a successor that leads to smaller
files at at the same video quality and has been supported by current browsers
for a while.

With the raise of hidpi and 4K displays we need a better codec that handles
those resolutions better, so switch to vp9.

https://bugzilla.gnome.org/show_bug.cgi?id=742744
2015-01-11 15:35:31 +01:00
Adel Gadllah
e150a9cff2 recorder: Stop using deprecated cogl_read_pixels 2015-01-11 12:53:13 +01:00
Sebastian Keller
01c6392c13 window-tracker: remove now unused launched_pid_to_app
https://bugzilla.gnome.org/show_bug.cgi?id=736527
2014-12-28 16:40:20 -08:00
Sebastian Keller
186f9b2e2c window-tracker: Fix pid based window/app association
The lookup table used by get_app_from_window_pid contained only pids of
apps launched by gnome-shell itself, but not pids of apps running before
gnome-shell was (re-)started. Also the pids in that table might not even
be the pid of the process that is actually showing the window if wrapper
scripts are used.

Instead use shell_window_tracker_get_app_from_pid which uses the pids
from the windows themselves.

This removes the only use of launched_pid_to_app which will be removed
in the following commit.

This fixes: https://bugzilla.gnome.org/show_bug.cgi?id=736527
2014-12-28 16:40:20 -08:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Giovanni Campagna
b21f5c5566 calendar-server: activate evolution-source-registry manually at startup
g_dbus_proxy_new() (and library calls that wrap it) has an hardcoded
timeout of 25 seconds, which is insufficient for starting up e-s-r
in certain setups. Avoid a timeout error by starting the service
manually with a longer timeout before hand.
Also demote the error to a warning + exit failure instead of
a crash, to avoid triggering abrt reports.

https://bugzilla.gnome.org/show_bug.cgi?id=735308
2014-12-14 17:18:16 -08:00
Florian Müllner
cad56c871a app: Respect icon-style for faded icon texture
Just like regular application icons, the faded icon texture used
in the app menu should follow the theme's icon style setting.

https://bugzilla.gnome.org/show_bug.cgi?id=740447
2014-11-29 18:13:03 +01:00
Florian Müllner
0acc7ed4c2 app: Use StIcon as icon_texture when loading from a GIcon
Themes - namely the HighContrast one - may now request symbolic
icons rather than fullcolor ones. In order to have recoloring
work as expected in that case, we will need a theme node to pick
up colors from - using an StIcon instead of manually loading a
texture from the cache gives us that for free, so do that.

https://bugzilla.gnome.org/show_bug.cgi?id=740447
2014-11-29 18:13:03 +01:00
Florian Müllner
2940ef07e9 st-theme-node: Add support for -st-icon-style property
GTK+ added support for a -gtk-icon-style property in themes to
enforce a particular icon style. Do the same for shell themes
with an -st-icon-style property, with the same set of possible
values as the GTK+ variant:
  'requested' - use symbolic or fullcolor icon depending on the
                icon name (default)
  'regular'   - enforce fullcolor icons
  'symbolic'  - enforce symbolic icons

https://bugzilla.gnome.org/show_bug.cgi?id=740447
2014-11-29 18:13:03 +01:00
Florian Müllner
deddac8748 st-texture-cache: Remove load_gicon_with_colors()
The split between st_texture_cache_load_gicon() and load_gicon_with_colors()
no longer makes any sense, so just move the code into the public method.

https://bugzilla.gnome.org/show_bug.cgi?id=740447
2014-11-29 18:13:03 +01:00
Florian Müllner
26389f92f5 build: Add org.gtk.Application.xml to distfiles 2014-11-27 14:05:26 +00:00
Phillip Wood
546ae00854 Add busy property to ShellApp
Using a separate property to show when the application is busy rather
than cramming it into the state property makes the code clearer. In most
places we only care if an app is running or not, not whether it is
actually busy.

https://bugzilla.gnome.org/show_bug.cgi?id=736492
2014-11-27 10:59:55 +00:00
Phillip Wood
e00bfcc2cf Use org.gtk.Application proxy to monitor app's busy state
This simplifies the code and fixes a race where an application could
call g_application_mark_busy() before the shell subscribed to change
notifications on the application's busy state.

https://bugzilla.gnome.org/show_bug.cgi?id=736492
2014-11-27 10:59:55 +00:00
Phillip Wood
943f6c9d28 Generate GDBus proxy object for org.gtk.Application
Having a proxy object will make it easier to monitor the application's
busy state.

This adds a dependency on gdbus-codegen

https://bugzilla.gnome.org/show_bug.cgi?id=736492
2014-11-27 10:59:55 +00:00
Jasper St. Pierre
dbf16d6ea3 shell-gtk-embed: Remove old hack workaround for a mutter bug
The window actor shouldn't have been picked since it has an empty
input shape, but bugs in mutter weren't properly interpreting that.

Since the Wayland restructure, the MetaWindowActor isn't actually
reactive anymore, it's the MetaSurfaceActorX11, so this code isn't
doing anything.
2014-11-26 12:54:37 -08:00
Carlos Soriano
2935fd4ffe St: support css margin property
It's implemented similar to the padding property, but instead of taking
into account the margin values at drawing time in node-drawing, we set
the clutter actor margins in StWidget when the style is computed.

In the case that a CSS margin is not specified, we don't to set a value
of 0 to the clutter actor margin. In this manner it allows to use
Clutter margin values set in the code. However, the margins that are set
both in the code and in the CSS on the same side, the result is
unpredictable.

We avoid to set the clutter actor margin values to 0 if there's no CSS
margin values defined, so we still allow clutter actors to use margin
set in the code.

https://bugzilla.gnome.org/show_bug.cgi?id=728437
2014-11-19 16:42:25 +01:00
Slavek Kabrda
be3c3c64c1 Port gnome-shell to Python 3
https://bugzilla.gnome.org/show_bug.cgi?id=732478
2014-11-07 10:18:58 +01:00
Christian Persch
5014434b9a st-button: Recognise all Enter keys as Return
Bug #704339.
2014-11-07 10:14:11 +01:00
Florian Müllner
5fca85cd28 scroll-view: Support GTK_POLICY_EXTERNAL
GTK+ added a new PolicyType which currently triggers compiler warnings
about unhandled values in switch statements. We also have a use case for
it already, so add support for the new policy type.

https://bugzilla.gnome.org/show_bug.cgi?id=739379
2014-10-30 00:37:55 +01:00
Florian Müllner
eb3fc7815e Use LC_TIME locale for strftime format string translations
We commonly mark strftime format strings for translation to account
for date/time representations without an existing strftime shortcut
("Yesterday %H%p"). As those translations are looked up according to
the locale defined by LC_MESSAGES, while the conversion characters
themselves are resolved according to LC_TIME, the result can be
rather odd when mixing locales ("Den 27. January"). The correct
solution would be to install translations for format strings in
the LC_TIME catalogue and look them up with dcgettext(), but we
don't have the infrastructure to do that easily. Work around this
by adding a helper method that looks up a string in LC_MESSAGES
using the locale defined by LC_TIME and use that to translate
format strings, which has the same result.

https://bugzilla.gnome.org/show_bug.cgi?id=738640
2014-10-16 23:41:51 +02:00
Cosimo Cecchi
642bf2b778 theme: convert stylesheet loading to GFile
In preparation to making it a GResource.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:54:00 -07:00
Cosimo Cecchi
328bb1c21b st: always use GFile internally
We're moving the theme infrastructure towards GResource, so as a first
step move all the loading to use GFiles instead of URIs or paths.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:53:39 -07:00
Cosimo Cecchi
2dc41c944e texture-cache: remove unused base64 code path
This was introduced in b0c6cf3f to support image data for web search
providers, which do not exist anymore. Just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:50:48 -07:00
Jasper St. Pierre
ea552ea157 keyboardManager: Adopt to changes in meta_display_freeze_keyboard 2014-10-14 14:47:23 -07:00
Owen W. Taylor
5e5035a0f7 StWidget: carefully clear ->accessible pointer to avoid resurrection
The pointer to ->accessible was cleared too early in dispose, which
resulted in another accessible object being created when the actor
was removed from its parent in clutter_actor_dispose(). Use a
weak reference instead to clear the ->accessible pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=738147
2014-10-13 12:46:35 -04:00
Jasper St. Pierre
aa3aea7520 window-tracker: Also listen for changes in the gtk-application-id
Wayland applications don't tend to have very useful WM Class properties,
as GTK+ isn't very good at picking an appropriate application ID. While
we should likely fix GTK+ to pick a better app ID, we do have the
existing gtk_shell for more accurate information. The only problem is
that the gtk_surface is set after the MetaWindow is constructed, and
we're not listening for changes on the GTK+ application ID.

Listen to changes on the GTK+ application ID to fix app tracking for
most GTK+ applications under Wayland.
2014-10-12 17:20:22 -07:00
Jasper St. Pierre
49fcc93a4b window-tracker: Fix minor style issue 2014-10-12 17:20:12 -07:00
Carlos Garnacho
eaec459ee9 st: Bail out on clipboard requests if there is no text.
If a selection request happens through foreign means, the selected
text is NULL, and a crash happens.

https://bugzilla.gnome.org/show_bug.cgi?id=738314
2014-10-10 19:37:40 +02:00
Adel Gadllah
bd3dfb8f6a Fix wrong comment 2014-10-09 14:55:13 +02:00
Adel Gadllah
1b3c89f32b shell-recorder: Disable unredirection while recording
This is required to be able to record windows that would
otherwise be unredirected.

https://bugzilla.gnome.org/show_bug.cgi?id=738226
2014-10-09 14:52:25 +02:00
Adel Gadllah
f02b007337 shell-screenshot: Only allow one screenshot request at a time per sender
We currently allow infinite number of screenshot requests to be active at
the same time, which can "dos" the system and cause OOM.

So fail subsequent requests for the same sender when a screenshot operation
is already running.

https://bugzilla.gnome.org/show_bug.cgi?id=737456
2014-10-03 16:22:36 +02:00
Florian Müllner
67b14d5fe5 st-entry: Implement Ctrl-u / Ctrl-k keybindings
These keybindings are well-established on the CLI (e.g. "kill-line"
and "unix-line-discard" in readline(3)), and adding support for them
is cheap ...

https://bugzilla.gnome.org/show_bug.cgi?id=737346
2014-09-26 22:03:31 +02:00
Alejandro Piñeiro
9896135c97 a11y: set again NO_AT_BRIDGE=1 before calling meta_init()
It was removed on commit
70099872ab
because it was thought to not be needed anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=736821
2014-09-18 15:37:10 +02:00
Adel Gadllah
aa6f352cb0 st-box-layout: Don't report a paint volume when we have no allocation 2014-09-15 17:35:17 +02:00
Florian Müllner
93205eefb9 global: Filter out destroyed actors from get_window_actors()
All current code assumes that the list of window actors corresponds to the
list of windows; however as the list returned by meta_get_window_actors()
now includes actors during the destroy animation, that assumption breaks.

Eventually we should make everyone move to a more appropriate API, but
for now make it work again by returning a filtered list of "good"
window actors.

https://bugzilla.gnome.org/show_bug.cgi?id=735927
2014-09-11 16:51:31 +01:00
Jasper St. Pierre
5faef316b8 Revert "wobbly"
This reverts commit 6751ca4c18.

As fun as it is, I don't think we want this by default.
2014-09-05 14:51:01 -07:00
Jasper St. Pierre
6751ca4c18 wobbly 2014-09-05 14:37:18 -07:00
Jasper St. Pierre
e04e507659 texture-cache: Use LTR/RTL icon lookup flags 2014-09-05 10:25:19 -07:00
Alejandro Piñeiro
70099872ab a11y: initialize clutter accessibility always.
In order to ensure that is clutter AtkUtil implementation the current one.

https://bugzilla.gnome.org/show_bug.cgi?id=735908
2014-09-03 18:45:32 +02:00
Jasper St. Pierre
e933302ae4 shell-glsl-quad: Provide a paint volume
To prevent from falling back to the slow path of doing a full-stage
repaint every time.
2014-09-01 14:06:08 -07:00
Jasper St. Pierre
584f8c8381 Makefile: Use $(NULL) in one more place 2014-09-01 13:06:51 -07:00
Adel Gadllah
eaff1e9290 perf-tool: Remove dead code 2014-08-18 22:58:30 +02:00
Owen W. Taylor
20fc9735fa Add a special background to use for performance testing
Performance testing was producing inconsistent values at different
times in the day since the GNOME default background is animated and
sometimes has a single layer, and sometimes two blended layers.

So we have consistent numbers, install a simple animated background
with GNOME Shell that has 40-year long transition ending in 2030,a
and set an environment variable in gnome-shell-perf-tool so that the
background is override with that background. (The background depends
on files installed by gnome-backgrounds; we assume that the person
running performance tests is doing so within the scope of a full
GNOME install.)

https://bugzilla.gnome.org/show_bug.cgi?id=734610
2014-08-18 10:54:42 -04:00
Jasper St. Pierre
5ce8980db3 shell-global: Remove grab notifier
With the window menus gone, it is no longer possible to have a GTK+ grab
in-process, so remove our code that was tracking GTK+ grabs.
2014-08-14 10:59:43 -04:00
Florian Müllner
0af4dc0b4c Remove explicit ENABLE_EXPERIMENTAL_API switches
Those are already defined globally via the Makefile, and newer
compiler versions complain about redefining those symbols.
2014-08-08 17:58:37 +02:00
Jasper St. Pierre
0810ab62db Port to cogl_texture_2d_new_from_data 2014-08-07 14:49:55 -04:00
Jasper St. Pierre
6f00d81abf texture-cache: Port to modern Cogl 2014-08-07 14:49:55 -04:00
Jasper St. Pierre
4184edc7f8 texture-cache: Remove FBO path for padding icons
GtkIconTheme now pads icons when it loads them to make sure that they
are square, so this code is effectively dead.
2014-08-07 14:49:55 -04:00
Jasper St. Pierre
05f9f991d8 st: Adapt the mutter implementation for create_texture_material
This is the new API that uses set_null_texture instead of a dummy texture.
2014-08-07 14:49:54 -04:00
Jasper St. Pierre
3df7ef6ce6 shell: Define COGL_ENABLE_EXPERIMENTAL_API and related defines globally
This allows us to use new Cogl APIs without having to define things in
every .c/.h file manually.
2014-08-07 14:49:54 -04:00
Giovanni Campagna
3182aba744 AppDisplay: don't show a "New Window" menu item if not possible
If the application reports itself as single window (through
an explicit indication in the desktop file or some heuristics),
not show a "New window" item that doesn't actually open a new window.

https://bugzilla.gnome.org/show_bug.cgi?id=722554
2014-08-01 11:45:18 +02:00
Giovanni Campagna
a0bd4a02e4 Fix accidental gvc downgrade 2014-07-31 16:54:34 +02:00
Olav Vitters
7e31015ba2 doap category core 2014-07-30 16:31:48 +02:00
Jasper St. Pierre
91c4408d23 shell-recorder: Don't use XI2 in the recorder to query the pointer
Just use the normal MetaCursorTracker, which works under Wayland.
2014-07-26 10:51:48 -04:00
Owen W. Taylor
83adb2a864 clutter.paintCompletedTimestamp: cogl_flush() before glFinish()
Calling glFinish() doesn't give us a reliable timestamp unless we
flush Cogl rendering to GL first.
2014-07-26 16:46:45 +02:00
Carlos Garnacho
a2f263dcbb st-button: Handle touch events
On touch events, StButton becomes locked to a single sequence, so no multiple
touches can trigger it simultaneously.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
Adel Gadllah
ce5cd3bf30 st-scroll-view-fade: Refuse to work without GLSL
Disable the effect when GLSL is not available otherwise we will
crash later.

https://bugzilla.gnome.org/show_bug.cgi?id=733623
2014-07-24 16:51:03 +02:00
Adel Gadllah
c9e00bee08 plugin: Use the clutter xdisplay for has_swap_events
The filter now runs on the backend connection.
2014-07-19 18:51:56 +02:00
Owen W. Taylor
c6350aa557 Add --hwtest option to gnome-shell-perf-helper
Add a --hwtest option to gnome-shell-perf-helper which runs the
tests in perf/hwtest.js with the appropriate environment, and then
logs the results using the 'gnome-hwtest-log' utility which is
available in the hardware testing environent.

(For development of hwtest.js in a normal environment, run the tests
as: gnome-shell-perf-tool --perf=hwtest --extra-filter=Gedit)

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 10:37:48 -04:00
Owen W. Taylor
9fff972946 perf: add a ShellGlobal property to call glFinish and log the time
It's useful to know how long frames are taking to render on the GPU.
This is impossible to measure in the normal case because frames may
parallelize with previous frames, but by calling glFinish() at the
end of the frame, we can create a (somewhat artificial, but useful)
environment where we have a meaningful timestamp for the frame
finishing drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 10:37:48 -04:00
Owen W. Taylor
e30925995f Make frame-timestamp logging optional
Instead of always logging frame timestamps for every frame - which
was using >26 bytes of memory per frame, or 5MB per hour of continuous
redrawing - make frame timestamps something that defaults off and is
turned turned on using a new ShellGlobal::frame-timestamps property by
the perf scripts.

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 10:33:59 -04:00
Owen W. Taylor
f0d4260c81 ShellPerfLog: Use monotonic timestamps for logging
Use g_get_monotonic_time() (that is, CLOCK_MONOTONIC) timestamps,
rather than gettimeofday() values.

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 10:33:59 -04:00
Owen W. Taylor
a7f82745c6 shell-perf-helper: Add an option for continual redraws
Add an option for windows created with Scripting.createTestWindow()
to continually redraw themselves; this is for testing performance
of application updates.

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 10:33:59 -04:00
Florian Müllner
e865db57e0 extension-tool: Fix multi-monitor handling in example extension 2014-07-05 11:22:46 +02:00
Adel Gadllah
775bd961b6 hidpi: Scale fonts on wayland
On X11 we don't need to scale up fonts because font scaling is already handled
by clutter based xft-dpi. On wayland we need to set the resolution by ourselves
so do that when the scale factor changes.

https://bugzilla.gnome.org/show_bug.cgi?id=732537
2014-07-01 12:02:19 +02:00
Carlos Garnacho
9f460a36f6 recorder: Fix typo
Both stage width and height are meant to be tracked.
2014-06-28 00:47:53 +02:00
Jasper St. Pierre
84bc445593 st-icon: Undeprecate icon-name
Don't cause a bunch of warnings when the icon-name property is still a
really convenient internal shorthand.
2014-06-26 18:16:50 -04:00
Giovanni Campagna
8c67a70db0 Add a helper to handle captive portal logins
Add a small DBus-activated GtkApplication that embeds a WebKitWebView
and implements some minimal logic to see if the login succeeds.
It will try to connect to a custom NM-provided url (the portal login
page), if one exists, or to www.gnome.org in the normal case of
a portal doing redirect.

https://bugzilla.gnome.org/show_bug.cgi?id=704416
2014-06-26 19:54:58 +02:00
Adel Gadllah
66f5e4b44d Revert "plugin: Don't query for swap_events support directly"
This reverts commit e23c2ffecc.

The patch was intended as a cleanup but accidently removed the setting of the
event base, breaking the swap event handling.

With the event base setting removing the other code isn't much of a cleanup so
just revert it.
2014-06-24 17:37:23 +02:00
Wim Taymans
17f481f6fe shell-recorder: send EOS to the pipeline
Send EOS to the complete pipeline instead of only to our own source.

When there are multiple sources in the pipeline (for example when we also
record audio), the pipeline will send the EOS to all sources in order to
shut down the complete pipeline.
2014-06-23 17:16:55 +02:00
Wim Taymans
b057e786a4 shell-recorder: depth and bpp are no more in 1.0
Remove 0.10 style bpp and depth, they are not needed anymore, the
format specifies the layout completely.
2014-06-23 17:15:44 +02:00
Wim Taymans
8b9904b6d0 shell-recorder-src: allow sending EOS to our source
When we send EOS to our source, make it queue the special item to cause
EOS after all buffers are pushed.
2014-06-23 17:15:44 +02:00
Wim Taymans
43ae3b8140 shell-recorder-src: use timestamping from basesrc
Use the do-timestamp feature of basesrc to place the correct timestamp
on each outgoing buffer.
2014-06-23 17:15:44 +02:00
Wim Taymans
f76dd4d6b2 shell-recorder-src: only negotiate once
Set the format of the basesrc to the configured caps only once
during negotiation instead of before pushing each buffer.
2014-06-23 17:15:44 +02:00
Florian Müllner
b981a591c7 main: Actually use the correct schema for overrides
Fix commit ae2751a68b to not only pick up the keys from the
correct schema, but also use the correct schema-id for the overrides.
2014-06-10 13:00:57 +02:00
Florian Müllner
ae2751a68b main: Move pref overrides back into C
Commit 6c2f3d1d17 moved pref overrides into JS to implement
session mode specific overrides in a clean and generic way.
However that approach comes with a cost - doing the overrides only
after having handled over control to JS means that the core will
be initialized with the non-overridden settings before changing
to the correct values. In the best case this is unnecessary work,
but it can in fact have a worse effect: when initializing workspaces,
we will restore the previous number of workspaces when using
dynamic-workspaces and reset to the configured number otherwise.
As the non-overridden default for dynamic-workspaces is FALSE, we
can easily end up moving the user's windows to the "wrong" workspace.

Now GSettings is expected to grow support for session specific defaults,
which will render our entire override system obsolete (yay!). Given
that, it seems acceptable to use a less generic (and uglier) approach
in the meanwhile, in order to fix aforementioned problems. So move
overrides back before core initialization and just hardcode the
session-mode => override-schema relation.

https://bugzilla.gnome.org/show_bug.cgi?id=695487
2014-06-09 21:52:03 +02:00
Florian Müllner
5b61f2d642 windowMenu: Implement new show_menu_for_rect() hook
Having the full geometry of the menu's source button (if any) will
allow us to address several misbehaviors of window menus, so use
that instead of show_menu().

https://bugzilla.gnome.org/show_bug.cgi?id=731058
2014-06-02 23:48:53 +02:00
Florian Müllner
214a41793f build: Remove GMenu include
The actual GMenu dependency was removed a while ago, so stop adding
it to the GIR includes.
2014-06-02 17:56:38 +02:00
Antoine Jacoutot
3584887938 openbsd: fix shell_global_reexec_self()
Rework the way we re-exec the shell on OpenBSD so that it does not only
work the first time it is re-exec'd.
Plug a small leak in the __linux__ case while here.

https://bugzilla.gnome.org/show_bug.cgi?id=727763
2014-05-30 11:26:39 +02:00
Florian Müllner
93c9e031e3 Update (allow-none) annotations
The annotation has been deprecated in favor of (nullable) and/or
(optional).
2014-05-28 22:01:55 +02:00
Jasper St. Pierre
516b8f6bf8 screenshot: Don't use meta_window_get_rect
It's going to be removed soon.
2014-05-27 15:14:33 -04:00
Florian Müllner
8811ba2ec0 Support (fallback) app menu in SSD
We now allow "appmenu" in the button layout to make synchronizing it
with GTK+'s client-side decorations easier, but as some people tweak
their settings to get in-window app menus even when using the shell,
actually pop up the app menu when the button is activated.

https://bugzilla.gnome.org/show_bug.cgi?id=730752
2014-05-27 19:49:05 +02:00
Jasper St. Pierre
752aca811c windowManager: Support coords 2014-05-22 10:51:49 -04:00
Owen W. Taylor
ff07d3a46a Renable compiler warnings and fix a few that show up
The switch to GNOME_COMPILE_WARNINGS() caused -Wall and other
warnings to not actually be used since GNOME_COMPILE_WARNINGS()
just sets WARN_CFLAGS. Add WARN_CFLAGS to AM_CFLAGS so that
it takes effect.

Add  -Wno-error=deprecated-declarations so that when -Werror is
enabled, we don't fail on all the deprecated cogl and clutter
symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=730408
2014-05-19 20:51:12 -04:00
Owen W. Taylor
5d11941638 Support resource:/// URL's in GNOME_SHELL_JS envvar
It can be useful to augment the shell's search path by doing

 GNOME_SHELL_JS=resource:///org/gnome/shell:<mypath>

But this doesn't work because resource: is split off. Special
case path elements that are just 'resource' and recombine
them with the next element.

https://bugzilla.gnome.org/show_bug.cgi?id=730409
2014-05-19 20:47:05 -04:00
Jasper St. Pierre
e7af257814 Implement window menus in gnome-shell
https://bugzilla.gnome.org/show_bug.cgi?id=726352
2014-05-17 15:17:29 -04:00
Carlos Soriano
103027a446 St: remove hover state if reactive disabled
The hover state of a widget can become persistent if
the widget becomes reactive while a pointer grab.
To avoid that, remove hover state if the reactive property
is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=728343
2014-04-29 01:02:27 +02:00
Florian Müllner
24897169a9 st-entry: Handle <shift>insert
GTK+ supports this as alternative to <ctrl>v, so let's do the same
for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=648318
2014-04-26 21:19:59 +02:00
Jasper St. Pierre
90589fabee texture-cache: Fix compile warning 2014-04-22 18:35:56 -04:00
Jasper St. Pierre
7fa1834ab6 extension-prefs: Remove extra whitespace 2014-04-15 17:54:51 -04:00
Jasper St. Pierre
c7bc9f8925 extension-prefs: Kill warning
We need to include shell-js.h
2014-04-15 17:54:51 -04:00
Florian Müllner
b4a48a7644 extension-prefs: Force linking with libgnome-shell-js
Use the same hack we use for the main executable to fool the linker
when using --as-needed.

https://bugzilla.gnome.org/show_bug.cgi?id=727948
2014-04-15 23:35:05 +02:00
Bastien Nocera
85f811f147 src: Name all the timeouts and idles
https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 19:38:04 +02:00
Jasper St. Pierre
ee0c76c2b9 Link to libmutter always
Wayland support was merged into mutter master.
2014-04-09 15:24:09 -07:00
Cosimo Cecchi
9c88fec4fc texture-cache: use scale factor for load_uri_async()
https://bugzilla.gnome.org/show_bug.cgi?id=726907
2014-03-28 10:53:01 -07:00
Cosimo Cecchi
9ecf466ce1 texture-cache: use scale factor to load background and borders
https://bugzilla.gnome.org/show_bug.cgi?id=726907
2014-03-28 10:53:01 -07:00
Cosimo Cecchi
a22fdea0e3 border-image: add support for scale factor
In a later commit we'll add support for rendering borders and
backgrounds with scale factor.

https://bugzilla.gnome.org/show_bug.cgi?id=726907
2014-03-28 10:53:01 -07:00
Cosimo Cecchi
90e52d7266 texture-cache: always call gdk_pixbuf_loader_set_size
Just use the regular image size if we don't want to scale it. This is a
refactor in preparation for the next commit.

https://bugzilla.gnome.org/show_bug.cgi?id=726907
2014-03-28 10:53:01 -07:00
Cosimo Cecchi
74d9b6c2bf texture-cache: use scale factor to load sliced image
We need to use a GdkPixbufLoader instead of the straightforward
gdk_pixbuf_new_from_file(), since we want to load the image already
scaled if possible - e.g. if it's an SVG file.

https://bugzilla.gnome.org/show_bug.cgi?id=726907
2014-03-28 10:53:01 -07:00
Jasper St. Pierre
573c1c86cc focus-manager: Make C ANSI-compliant 2014-03-15 15:44:40 -04:00
Florian Müllner
66b71a36ce app-system: Filter out stale apps from cache
Since rebasing our AppSystem on GLib's facilities, we only ever
append to the id-to-app cache. So if an application is uninstalled,
shell_app_system_lookup_app() will still happily return it if it
was cached previously. For instance if a favorite app is uninstalled,
it keeps lurking in the dash until a restart.
To fix, filter out removed apps from the cache when handling
GAppInfoMonitor::installed-changed.

https://bugzilla.gnome.org/show_bug.cgi?id=726414
2014-03-15 15:56:30 +01:00
Adel Gadllah
c492415386 hidpi: Make sure gdk and clutter scaling stays disabled when the scale factor changes
Not doing that could led to messy situations when the user changes the scale factor
at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=726238
2014-03-13 14:16:11 +01:00
Adel Gadllah
5616bbd45b hidpi: Listen for gtk-xft-dpi instead of monitors-changed
Currently we update the scale factor on startup and when we get a
monitors-changed signal, which is not the only cases where the setting changes. We cannot listen for gdk-window-scaling-factor changes because it is not
exported to gdk.

So use gtk-xft-dpi which also indicates a scale factor change.

When someone changes gtk-xft-dpi directly without changing the scale factor
we will just re-read the gdk-window-scaling-factor so no harm is done.

https://bugzilla.gnome.org/show_bug.cgi?id=726238
2014-03-13 14:16:11 +01:00
Giovanni Campagna
ac76940530 StTextureCache: don't crash if we fail to allocate a framebuffer
It's possible that FBO creation fails due to hw limits or the
driver not exposing the EXT_framebuffer_object extension.
In that case, just give up on creating square icons.

https://bugzilla.gnome.org/show_bug.cgi?id=724977
2014-03-12 19:26:41 +01:00
Giovanni Campagna
edd66c40d9 ScreenShield: send a signal to GSD to wake up the screen
Instead of poking through IDLETIME, which confuses the state tracking
and can prevent automatic suspend, send a special signal to GSD
when the screen is to be waken up for a notification.

Someday we'll bring over all the state tracking and avoid this
ping-pong between gnome-shell and gnome-settings-daemon, but
that day's not today.

https://bugzilla.gnome.org/show_bug.cgi?id=712706
2014-03-11 18:10:05 +01:00
Giovanni Campagna
fc4bc5277a Lightbox: complete radial effect for modal dialogs
Rework the radial effect to use similar code to MetaBackground,
and adjust parameters to make it more noticeable.

https://bugzilla.gnome.org/show_bug.cgi?id=725830
2014-03-11 17:14:07 +01:00
Dan Williams
59f9eaa1c9 NetworkAgent: fix initial secrets requests after 17726abb
While the named commit was correct for VPN connections, it didn't
work correctly for the initial secrets requests like when connecting
to a new access point.  In that case, secrets *should* be requested
when none are found, but only if interaction is enabled.  The
bits of 17726abb which removed checking secrets against the hints
*were* correct, but 17726abb removed too much.

Also, to ensure passwords don't get inadvertently cleared when
simply reading them from the keyring, don't save passwords
unless something might have changed.

https://bugzilla.gnome.org/show_bug.cgi?id=724779
2014-03-03 15:17:43 +01:00
Adel Gadllah
e37a3fa7e6 perf: Restore shell after runs
Currently running the perf tool results into no wm running
afterwards making it hard for the user to get the results from a terminal
and generally does not make it easy for users to run it to gather numbers.

So restore the shell after the test has completed.

https://bugzilla.gnome.org/show_bug.cgi?id=724870
2014-02-28 21:40:31 +01:00
Adel Gadllah
e23c2ffecc plugin: Don't query for swap_events support directly
There is no need for the duplication, clutter already exports
this information.

https://bugzilla.gnome.org/show_bug.cgi?id=724870
2014-02-28 21:40:31 +01:00
Jasper St. Pierre
b7eb1f3e8b Don't use get_core_device
clutter_device_manager_get_core_device calls XIGetClientPointer, which
requires a round-trip to the server. Since we do this on StWidget
creation, this means a full round-trip for every created StWidget.
Replace this with get_device with the ID of the VCP/VCK, since mutter
doesn't support MPX, and we know this is what the device is.
2014-02-27 14:55:29 -05:00
Jasper St. Pierre
751154d9da shell-util: Fix warning in shell_util_cursor_tracker_to_clutter
If the sprite is NULL, like if a Wayland app wanted to hide the cursor,
then we need to hide the ClutterTexture on our side, as ClutterTexture
has no easy way to tell it to paint nothing.
2014-02-23 10:54:32 -05:00
Jasper St. Pierre
29addc499c shell-global: Only set the scale factor if get_setting succeeded
If gdk_screen_get_setting fails, like if it's running without XSettings,
then the GValue will have a value of 0. A lot of code tries to divide by
the scale factor. This produces NaN, and combined with the fact that NaN
is "leaky", we very quickly end up spinning out of control.
2014-02-23 10:54:32 -05:00
Jasper St. Pierre
b494c15e4b shell-js: Kill some compile warnings
jsapi.h has some bad warnings with gcc. gjs-module.h already includes
jsapi.h and uses a complicated set of GCC pragmas to mask them out, so
just kill our include.
2014-02-22 17:42:03 -05:00
Florian Müllner
6d93c8b3fd windowManager: Implement tile previews
Mutter now delegates tile previews to compositor plugins, so
add a simple implementation based on the UI previously provided
by mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-20 00:29:14 +01:00
Florian Müllner
2663e1be5d window-tracker: Be more cautious when setting focus app
Since we started tracking non-interesting windows, we can no longer
assume that if we manage to find an app associated with the focus window,
it should appear focused - we now can find apps for docks, the DESKTOP
window etc.
To restore the old behavior, make sure that the focus window or one of
its parents is "interesting".

https://bugzilla.gnome.org/show_bug.cgi?id=722928
2014-02-20 00:29:14 +01:00
Adel Gadllah
470ac0eae3 shell_global: Use correct agruments for in update_scale_factor
Otherwise we crash ...

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-18 23:40:34 +01:00
Adel Gadllah
87abbf9b20 hdpi: Revert hacks
Revert the hacks that where added in response to a bug caused by
commit ba459f4d20

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-18 23:40:34 +01:00
Giovanni Campagna
d555fd7883 ShellApp: remove impossible check
The action muxer is created and destroyed with the running state,
it can never be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=722554
2014-02-17 20:44:58 +01:00
Cosimo Cecchi
f543161234 st-icon: remove custom size request/allocate
Use a layout manager instead. This has the effect of not enforcing a
priv->icon_size size request, since that value is unscaled.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:25 -08:00
Cosimo Cecchi
407dc74502 shell-app: finish support for loading with scale
https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:24 -08:00
Cosimo Cecchi
e5e764b402 texture-cache: require icon scale to load gicon
To support HiDpi.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:24 -08:00
Giovanni Campagna
f6240e114c Don't send all debug messages to Telepathy
The log handler can be invoked at bad times, and in particular
it can be invoked from gsignal with the signal lock taken.
At that time, calling into arbitrary high-level APIs can
cause a dead-lock.
Instead, only send to telepathy the tp-glib debug messages.
Everything else is in the journal anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=724256
2014-02-13 13:03:37 +01:00
Adel Gadllah
6f87b01c47 Revert "shell-global: Set high dpi scaling factor"
This reverts commit ba459f4d20.

This breaks gdm.
2014-02-12 22:53:11 +01:00
Adel Gadllah
ba459f4d20 shell-global: Set high dpi scaling factor
Set the scaling factor based on the xsetting.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-12 19:45:53 +01:00
Adel Gadllah
d868e6bfaf st: Add high dpi support
Add a scale_factor property to StThemeContext that can
be used to enable (integer) scaling of pixel values.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-12 19:45:47 +01:00
Michael Biebl
9f3499a7c3 make NetworkManager optional
NetworkManager is only available on Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=669495
2014-02-11 18:04:44 -05:00
Ryan Lortie
ccec7732a7 calendar server: fix _LDFLAGS vs _LDADD mixup
_LDFLAGS is for flags.  _LDADD is for LIBS.

https://bugzilla.gnome.org/show_bug.cgi?id=724184
2014-02-11 17:46:44 -05:00
Florian Müllner
2fba8e29e0 shell-app: Rename internal function as suggested in review
Ooops, this was meant to be squashed with commit d44f40d105.
2014-01-31 13:59:30 +01:00
Florian Müllner
de1bb4e203 window-tracker: Remove is_window_interesting()
It is now unused, so kill it.

https://bugzilla.gnome.org/show_bug.cgi?id=723308
2014-01-31 13:49:07 +01:00
Florian Müllner
b4680a5c25 Use meta_window_is_skip_taskbar() directly
Rather than going through ShellWindowTracker, we can just clean up
the code to use the underlying MetaWindow property directly.

https://bugzilla.gnome.org/show_bug.cgi?id=723308
2014-01-31 13:49:07 +01:00
Florian Müllner
d44f40d105 shell-app: Track changes to MetaWindow:skip-taskbar
So far we have assumed that whether or not a window is interesting
is static. In general this is the case, but as it is legal for the
underlying properties to change at any time, there are of course
offenders that actually do this (flash I'm looking at ya).
While we used the property to determine whether a window should be
tracked or not, the worst case was showing windows that should be
hidden or missing windows that should be shown.
However as we nowadays base an app's running state on the number of
interesting windows, we need to be more careful in order to avoid
ending up with running apps with no windows.

https://bugzilla.gnome.org/show_bug.cgi?id=723308
2014-01-31 13:49:07 +01:00
Florian Müllner
8d5771e302 window-tracker: Use MetaWindow:skip-taskbar
The code from shell_window_tracker_is_window_interesting() is equivalent
of MetaWindow's skip-taskbar property, so use it to avoid code duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=723308
2014-01-31 13:49:06 +01:00
Florian Müllner
ac22172a6e window-tracker: Fix memory leak
shell_window_tracker_get_window_app() returns a new reference
which we need to drop once we're done.

https://bugzilla.gnome.org/show_bug.cgi?id=722927
2014-01-30 23:55:13 +01:00
Jasper St. Pierre
36c69124f7 shell-app: Don't crash when trying to dispose
If we dispose a ShellApp that has windows left, then we'll crash
when we remove the last window, as that frees and NULLs out
app->running_state.

https://bugzilla.gnome.org/show_bug.cgi?id=723197
2014-01-29 14:02:26 -05:00
Jasper St. Pierre
ef9ade3548 shell-global: Remove unused declaration 2014-01-28 11:17:34 -05:00
Florian Müllner
ba06a87ba8 window-tracker: Fix typo 2014-01-24 12:38:27 -05:00
Jasper St. Pierre
a739455414 gnome-shell-extension-prefs: Fix warnings 2014-01-23 14:38:31 -05:00
Florian Müllner
73f6e75d8d shell-app: Unref running state when window count drops to zero
With the lastest ShellApp changes, an app is considered stopped
when the last "interesting" window is closed. However the app
may still track non-interesting windows, so if we unref the
running state on the state transition, we hit an assertion later-on
when trying to remove the non-interesting window.
Fix this by keeping the running state around until the last window
is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=722840
2014-01-23 12:45:23 -05:00
Florian Müllner
b62c157680 shell-app: Base running state on "interesting" windows
An app should be considered running if it has at least one "interesting"
window, however the code considers an app running if it has at least
one tracked window. This was fine while we were only tracking interesting
windows, but since commit d21aa0d85f this is no longer the case.
So keep track of the number of interesting windows as well and use that
to determine the running state.

https://bugzilla.gnome.org/show_bug.cgi?id=722690
2014-01-22 22:16:03 +01:00
Florian Müllner
cca14053a4 window-tracker: Always enable transient_for redirection
It is possible to associate an application's window with a different
application using the transient_for hint. However we currently only
consider the hint in get_window_app() and not when making the original
association, which opens the door to some confusing inconsistencies;
for instance, get_window_app() will not necessarily return the same
value for all windows retrieved via shell_app_get_windows().
Fix this by looking at the transient_for hint when making the original
association, not just in get_window_app().

https://bugzilla.gnome.org/show_bug.cgi?id=722434
2014-01-22 13:52:49 -05:00
Giovanni Campagna
3227d4f3ed ShellApp+ShellGlobal: unify app launch context code
Extend shell_global_create_app_launch_context() with the required
parameters and use that for shell_app_launch() too.

https://bugzilla.gnome.org/show_bug.cgi?id=669603
2014-01-19 18:51:48 +01:00
Giovanni Campagna
7e27afb645 Introduce support for desktop actions in the dash
Using the new list_actions() API in Gio, add entries for static
actions specified in .desktop files in the right-click app menus,
in the dash, app well and search.

https://bugzilla.gnome.org/show_bug.cgi?id=669603
2014-01-19 18:47:29 +01:00
Giovanni Campagna
7e9ecf4eb2 Add a radial background shade for modal dialogs
Use a new ShellGLSLQuad actor class to build a RadialEffect that can be
enabled on Lightboxes to achieve a radial effect similar to the overview
one. Then enable it for modal dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=669798
2014-01-19 16:02:46 +01:00
Giovanni Campagna
7d13cf1587 ShellTrayIcon: forward key presses too
StWidget::popup-menu is emitted when Menu/<Shift>F10 is pressed,
not released (for consistency with Gtk+), so we need to forward
that. Note that for key press we don't emit the matching key
release, because the app will take a grab and get the event directly
from X when the key is physicall released.

https://bugzilla.gnome.org/show_bug.cgi?id=721267
2014-01-19 15:42:54 +01:00
Rico Tzschichholz
24cd13935a build: Don't dist generated gresources files
In addition to 2dd7db4808
2014-01-19 10:15:15 +01:00
Rico Tzschichholz
1ae7dbec67 build: Fix linker failure for gnome-shell-extension-prefs
In addition to 2dd7db4808
2014-01-19 10:08:42 +01:00
William Jon McCann
b2a65f809f Use recommended quotes
See https://wiki.gnome.org/Design/OS/Typography
2014-01-17 16:34:44 -05:00
Florian Müllner
2dd7db4808 Make gnome-shell-extension-prefs a binary executable
Since commit 1ebb162a00 moved JS sources into resources,
the extension-prefs tool was broken. To fix it, we would either
need to generate an external GResource in addition to the generated
C code and teach gjs-console about loading it before evaluating
the script, or turn gnome-shell-extension-prefs into a binary with
the JS resources compiled in.

https://bugzilla.gnome.org/show_bug.cgi?id=722334
2014-01-16 09:33:01 -05:00
Jasper St. Pierre
0d92451c49 shell-global: Remove unused gc-notifications support
This is going to be removed upstream.
2014-01-15 09:18:53 -05:00
Jasper St. Pierre
d34bf9a14d app-system: Remove unnecessary debugging statement
It's just spam.
2014-01-10 15:19:07 -05:00
Jasper St. Pierre
5c5b9cfd96 Also update gtkaction*
Forgot about this.
2014-01-09 14:59:31 -05:00
Jasper St. Pierre
9d683f4767 gtkmenutracker: Update from GTK+ 2014-01-09 14:47:11 -05:00
Ray Strode
43cffd7c4a main: allow session mode to be specified in the environment
Specifying the session mode on the command-line doesn't play
well with session management (since the saved session desktop
file well either drop the specified session mode, or force it
always, even if the user picked a different mode at the login
screen)

This commit adds support for specifying the session mode via an
enviroment variable. For now, keep the old command line interface
for backward compatibility

https://bugzilla.gnome.org/show_bug.cgi?id=720894
2014-01-07 16:36:26 -05:00
Andika Triwidada
f3dad3765e Changed obsolete FSF postal address.
https://bugzilla.gnome.org/show_bug.cgi?id=721507
2014-01-08 04:35:14 +07:00
Giovanni Campagna
65f00f3af2 ShellWindowTracker: remove gtk-doc marks from private functions
static internal functions should be documented with /*, not /**

https://bugzilla.gnome.org/show_bug.cgi?id=721439
2014-01-04 17:34:29 +01:00
Giovanni Campagna
6544326ffd ShellWindowTracker: fix reference counting of ShellApp
All get_app_from_*() helpers are transfer full, but
get_app_from_gapplication_id() was directly returning the result
of lookup_app(), which is transfer none.

https://bugzilla.gnome.org/show_bug.cgi?id=721439
2014-01-04 17:34:10 +01:00
Jasper St. Pierre
178b8471cc shell-global: Remove an explicit js-version set
gjs's default js-version is already 1.8, and we're planning on removing
this API in the future, in accordance with upstream.
2014-01-02 13:41:14 -05:00
Giovanni Campagna
f3feb13dfe ShellAppSystem: own the memory for the startup wm class and app id
The hash table must keep a copy of the IDs, because the GAppInfos
are unreferenced (and thus freed) at the end of the function.
This was possibly not a problem if the GAppInfos were referencing
the memory-mapped cache, but it becomes one for regularly parsed
desktop files in ~/.local.

https://bugzilla.gnome.org/show_bug.cgi?id=721039
2013-12-26 23:44:54 +01:00
Dan Williams
17726abb0a NetworkAgent: handle empty hints and VPN secrets correctly
get_secrets_keyring_cb() contained an optimization (copied over from
nm-applet) that avoided a D-Bus round-trip when NetworkManager sent
secrets hints that were not satisified by the user.  This code did
not properly handle empty hints though, and proceeded to always
request new secrets whenever empty hints were sent.  Remove this
code entirely since the complexity is not worth it (per Jasper).

Second, get_secrets_keyring_cb() was mishandling VPN secrets which
were marked as "always ask".  Because the VPN secrets are not GObject
properties because they cannot be pre-defined, they are passed in
a hash table that is a GObject property marked 'secret'.  Unfortunately,
that means that the shell agent cannot determine their secret flags.
But since the VPN plugin auth dialogs have much better information
about what's required than the shell agent does, always ask the VPN
auth dialogs to handle the secrets requests after grabbing any that
already exist from the keyring.  This is also what nm-applet does.

https://bugzilla.gnome.org/show_bug.cgi?id=719815
2013-12-13 16:23:24 -06:00
Jasper St. Pierre
b168ccb605 st-scroll-view: Fix style 2013-12-11 20:36:44 -05:00
Florian Müllner
d21aa0d85f shell-app: Track all application windows
Filtering out "non-interesting" windows beforehand as we currently do
means that we may get properties that should be based on all windows,
like the last time the application was used, wrong.
Just track all windows and filter out non-interesting windows manually
in the one place we actually care about the difference.

https://bugzilla.gnome.org/show_bug.cgi?id=719824
2013-12-07 10:10:06 +01:00
Jasper St. Pierre
a7aba1d585 st-widget: Sort actors by distance from the focused actor
Sorting actors by the distance in the axis of movement first and against
the axis otherwise means that if we have a situation like:

  A      F
   B

where "F" is the focused actor, and it slightly overlaps with B vertically,
then we'll choose "B" to go left, rather than "A", which is most likely
what the user intended.

This is especially apparent in the overview where slight window size
differences mean we might not get an exact grid shape.

https://bugzilla.gnome.org/show_bug.cgi?id=644306
2013-12-04 11:22:55 -05:00
Bastien Nocera
ebc15e60a8 bluetooth: Remove GnomeBluetoothApplet hacks
https://bugzilla.gnome.org/show_bug.cgi?id=719341
2013-11-26 18:53:18 +01:00
Jasper St. Pierre
913739d732 shell-app: Remove unused method 2013-11-19 18:11:43 -05:00
Jasper St. Pierre
c85145d73c entry: Make sure we chain up in enter/leave handlers
To ensure that the focus tracking executes correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=706749
2013-11-15 12:51:19 -05:00
Jasper St. Pierre
e50a59361d entry: Remove old documentation about the hover style class 2013-11-15 11:14:36 -05:00
Jasper St. Pierre
ba602c17d4 appDisplay: Use the desktop file index for app searching
Rather than scanning all apps for searching, use Ryan's new desktop
file index and the glib support APIs for app searching instead of our
own system.

https://bugzilla.gnome.org/show_bug.cgi?id=711631
2013-11-14 14:28:52 -05:00
Jasper St. Pierre
ad03fb0815 app-system: Add back StartupWMClass matching
While unfortunate that we still have to scan all apps with get_all(),
support for this feature will be short-lived, so hopefully we can drop
it in the future as new apps adapt to the desktop file / app ID
recommendations.

For now, simply scan all desktop IDs.

https://bugzilla.gnome.org/show_bug.cgi?id=711631
2013-11-07 16:35:03 -05:00
Jasper St. Pierre
e10d2a68f3 app-system: Put back support for the installed-changed signal
Use the new GAppInfoMonitor that Ryan added to glib to know when the
set of apps has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=711631
2013-11-07 16:35:03 -05:00
Colin Walters
213ee8d381 ShellApp: Connect applications to systemd journal (if available)
Systemd-for-the-user-session would also do this, but that's a deeply
invasive change that I may not actually get to this cycle.  This
change is tiny and non-invasive, but provides an important benefit:
You can actually reliably tell *which* applications are logging which
messages (assuming they're launched by the shell).

This actually complements a recent change in DBus:
See https://bugs.freedesktop.org/show_bug.cgi?id=68559
which does a similar thing for bus activated apps.

https://bugzilla.gnome.org/show_bug.cgi?id=711626
2013-11-07 13:44:03 -05:00
Jasper St. Pierre
69f17da5ca trivial: Fix the signedness of boolean fields
The standard old kludge with gboolean being signed, not unsigned.
Encountered while printing the values for debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=644306
2013-11-05 09:11:49 -05:00
Jasper St. Pierre
5c0ee02251 trivial: st-widget: Remove super old 'stylable' property
I don't think we ever used this, even way back in 3.0...

https://bugzilla.gnome.org/show_bug.cgi?id=644306
2013-11-04 21:11:00 -05:00
Jasper St. Pierre
09fe31179a app-system: Fix memory leak
The shell app takes a ref on the info.
2013-11-03 16:20:00 -05:00
Jasper St. Pierre
78343f4837 app-system: Fix bad code
I had this locally, but forgot to amend before pushing apparently
2013-11-03 16:19:53 -05:00
Jasper St. Pierre
a5619bc0a3 app-system: Fix const warning 2013-11-03 12:50:21 -05:00
Jasper St. Pierre
dcb28aad2a app-system: Fix the keys in the id_to_app table
The ID that's passed to us isn't usable as a key to store, as it's
probably junk after the method returns. Use the app's storage for
the ID instead.
2013-11-03 12:10:00 -05:00
Jasper St. Pierre
7890af1659 app-system: Lazily create ShellApps for apps we care about
Rather than create all ShellApps up-front, create them lazily. We really
had no reason to do this before as we were scanning GMenu to get all the
apps, but doing this can remove a need for get_all, which is slow and
memory-hungry.
2013-11-02 20:50:35 -04:00
Jasper St. Pierre
d27d9fe694 app-system: Remove use of gnome-menus internally
We want to transition to a system in the future where we have a desktop
file cache. As we no longer differentiate categories or similar, it no
longer makes sense to have app visibility based on categories. Thus,
we no longer need to use gnome-menus to list all apps. The potential
issue here is reloading all desktop files when new files are created,
but this can be dealt with individually.

The "All Applications" view still uses gnome-menus.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:37 -04:00
Jasper St. Pierre
5d0d859a1f app-system: Remove visible_id_to_app
Since appDisplay.js makes its own GMenu tree, it's not necessary
anymore. This does mean that searches will show apps in NoDisplay
categories, but that's an obscure enough edge case not to matter.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:37 -04:00
Jasper St. Pierre
40c966fcd6 app-system: Remove lookup_app_for_path
It's absurdly silly. Just modify the one place that uses it
to be better.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:37 -04:00
Jasper St. Pierre
d9245598a4 app-system: Remove known_vendor_prefixes
This does remove support for legacy prefixed app infos with
subdirs, but since we want to remove support for the menu spec,
let's not even bother.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:37 -04:00
Jasper St. Pierre
03b0f4b16b app-system: Remove get_tree
Make clients construct their own gmenu tree if they need it.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:37 -04:00
Jasper St. Pierre
2daa0d057b app-system: Map wmclass to ID rather than apps
This makes the refcounting and memory management easier to understand.
2013-11-02 20:12:36 -04:00
Jasper St. Pierre
76eca409a3 app-system: Don't use gmenu_tree_entry_get_desktop_app_info
It's a broken method when it comes to giving us a useful GDesktopAppInfo,
and it's hard to fix libgmenu properly, so simply recreate the app info
using the desktop file ID that libgmenu has.
2013-11-02 20:12:36 -04:00
Jasper St. Pierre
d84b018ba7 app: Port to be based on GDesktopAppInfo
We weren't using the GMenuTreeEntry for anything special anymore,
so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:36 -04:00
Jasper St. Pierre
027c3d1661 app-system: Remove lookup_app_by_tree_entry
We want to move away from gnome-menus eventually, so the simple
utility method isn't really worth keeping around. Reimplement it
in the one place that uses it.

https://bugzilla.gnome.org/show_bug.cgi?id=698486
2013-11-02 20:12:36 -04:00
Antoine Jacoutot
15ff426be8 shell_global_reexec_self: add support for OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=709571
2013-10-31 11:46:59 +01:00
Rico Tzschichholz
c4a6837d56 build: Make sure built-sources are introspected as needed 2013-10-31 00:01:38 +01:00
Jasper St. Pierre
a347a75617 st-theme: Use constructed instead of constructor 2013-10-30 18:33:13 -04:00