Commit Graph

2148 Commits

Author SHA1 Message Date
Carlos Garnacho
44e80f4c46 st-texture-cache: Plug some pixbuf refcount leaks on async operations
When extracting the sliced image, the GTask grants data ownership on
g_task_propagate_*, so the pixbuf list must be properly freed. On async
load, we just left a dangling reference when returning on the async
task.

https://bugzilla.gnome.org/show_bug.cgi?id=642652
2017-04-07 14:17:59 +02:00
Bastien Nocera
65d93eacd3 gvc: Fix some memory leaks 2017-04-06 15:19:36 +02:00
Florian Müllner
b477d215a8 st: Add missing %NULL check
st_theme_node_get_border_image() may return %NULL, leading to a
segfault in st_border_image_get_file() when glib is compiled with
G_DISABLE_CHECKS.

https://bugzilla.gnome.org/show_bug.cgi?id=780381
2017-03-22 18:51:51 +01:00
Florian Müllner
5de85c708f calendar-server: Remove unused variables and function
The code that used them was removed in commit 7e0e224e0e.

https://bugzilla.gnome.org/show_bug.cgi?id=780381
2017-03-22 18:51:51 +01:00
Florian Müllner
2d814bfc5e main: Remove telepathy-specific log handling
The built-in telepathy integration is far less prominent than it
used to be, and doesn't really justify a link time dependency to
send debug message over D-Bus.

https://bugzilla.gnome.org/show_bug.cgi?id=771721
2017-03-10 17:10:52 +01:00
Florian Müllner
8f8e512b37 main: Use GBusNameOwnerFlags to specify flags
We are still using DBUS_NAME_FLAG_REPLACE_EXISTING from dbus-glib
in some places (whose headers are drawn in via telepathy-glib).
As both GIO and dbus-glib use the values that will end up being
sent on the bus, the define and enum value are interchangeable,
but it's clearly better to consistently use the library that is
explicitly included.

https://bugzilla.gnome.org/show_bug.cgi?id=771721
2017-03-10 17:10:52 +01:00
Florian Müllner
3c828c8387 shell: Remove TpClient
With the telepathy component now being implemented purely in JS, we
can drop the C helper class.

https://bugzilla.gnome.org/show_bug.cgi?id=771721
2017-03-10 17:10:52 +01:00
Hyungwon Hwang
4b80cbe1cd xdnd: Remove XDnD handling code and receive DnD signals from mutter
Move the XDnD handling code to mutter, and receive DnD handling signals from
mutter directly.

https://bugzilla.gnome.org/show_bug.cgi?id=765003
2017-03-07 08:29:51 +08:00
Hyungwon Hwang
46f3712421 xdnd: Rename XDnD handling signals to more inclusive ones
Rename the signals which have been used to handle XDnd events to more inclusive
ones. So that these signals can be used to handle the DnD events in Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=765003
2017-03-07 08:29:51 +08:00
Piotr Drąg
649d360289 Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772210
2017-02-16 02:07:14 +01:00
Jonas Ådahl
a46ea3f8a0 Use the versioned libmutter*.so versions
Mutter now provides versioned libraries and pkg-config files, meaning
an application using libmutter and friends need to depend on a specific
version of the API.

https://bugzilla.gnome.org/show_bug.cgi?id=777317
2017-02-14 11:23:09 +08:00
Philip Chimento
d017e6749c main: Destroy GjsContext before exit
Here are a few places where I missed it before: the GjsContext must be
unrefed before exiting, or it will crash on exit.

https://bugzilla.gnome.org/show_bug.cgi?id=778425
2017-02-10 13:19:01 -08:00
Alan Coopersmith
ddfdfaed78 Use /proc/self/cmdline on Solaris as well in shell_global_reexec_self()
Solaris 11.3.5 and later have a Linux-compatible implementation of
/proc/self/cmdline, so the code to use it can be enabled in gnome-shell
on Solaris - if used on an older OS, it simply fails to open the file
and returns without doing anything, just as the code did before enabling
this.

https://bugzilla.gnome.org/show_bug.cgi?id=776199

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-02-10 11:22:30 +01:00
Florian Müllner
a870a4d6de widget: Only include visible actors in focus chain
It isn't useful to move the keyboard focus to a hidden actor, so
only include visible actors in the focus chain - this is in fact
the documented behavior of st_widget_get_focus_chain(), so having
the default implementation return all children has always been
unexpected.

https://bugzilla.gnome.org/show_bug.cgi?id=778158
2017-02-08 14:50:36 +01:00
Florian Müllner
e6e786a19c st-theme-node: Fix lookup of time values
We have a time when the content type is seconds *or* milliseconds,
not seconds *and* milliseconds. Whoops ...

https://bugzilla.gnome.org/show_bug.cgi?id=778145
2017-02-06 14:30:18 +01:00
Adrian Perez de Castro
5136369c18 Properly detect changes in .desktop files
This fixes the shell not picking updates to the contents of the underlying
.desktop files for application launchers, or when a .desktop file is
overriden by a user-installed one under ~/.local/share/applications

https://bugzilla.gnome.org/show_bug.cgi?id=773636
2017-01-23 17:25:39 -06:00
Jonas Ådahl
c131c44ef6 gtk-embed: Don't try to compare with unrealized window
After having embedded a Gtk window, we start to listen for the
corresponding MetaWindow to know when it has been mapped by the
compositor. If the embedder does not realize the window immediately,
and some other window is created and mapped before the embedder
realizes the window, we would prior to this patch try to dereference
the not created GdkWindow. Fix this by NULL checking the GdkWindow
before dereferencing. We will never miss the needed MetaWindow creation
since it can not have been mapped have it not yet been realized.

https://bugzilla.gnome.org/show_bug.cgi?id=776130
2016-12-15 19:42:48 +08:00
Philip Chimento
dc110db4e0 tests: Destroy GjsContext before exit
This will be required in the upcoming version of GJS.

https://bugzilla.gnome.org/show_bug.cgi?id=775374
2016-12-09 18:50:39 -08:00
Philip Chimento
83005e27da main: Destroy GjsContext before exit
This will be required in the upcoming version of GJS.

The reference count on ShellGlobal is 2 at this point, because JS holds a
reference due to the "window.global = Shell.Global.get()" line in
ui/environment.js. Therefore, destroy the GjsContext first, then unref
the ShellGlobal object.

Cleaning up ShellGlobal was previously only enabled behind a debug
environment variable, but it should be required now.

https://bugzilla.gnome.org/show_bug.cgi?id=775374
2016-12-07 11:34:15 -08:00
Philip Chimento
56b20ef779 helpers: Destroy GjsContext before exit
This will be required in the upcoming version of GJS.

https://bugzilla.gnome.org/show_bug.cgi?id=775374
2016-12-07 11:34:15 -08:00
Rui Matos
68b671a4f4 shell-wm: Add a size-changed signal to handle the new plugin vfunc
https://bugzilla.gnome.org/show_bug.cgi?id=770345
2016-11-23 18:42:59 +01:00
Florian Müllner
1de1fd44c5 texture-cache: Warn when loading sliced image fails
Sliced images are loaded into a group actor with one child actor
per slice. In case loading the image fails, we currently quietly
return the empty group actor, which makes diagnosing problems
unnecessarily hard - just be a bit more verbose on failure.

https://bugzilla.gnome.org/show_bug.cgi?id=774805
2016-11-22 18:38:10 +01:00
Jonh Wendell
2812afed22 gnome-shell-extension-tool: Add a reload option
This might be a good fit for extension developers: With
this option one doesn't need to restart the whole Shell
in order to see their changes in effect.

https://bugzilla.gnome.org/show_bug.cgi?id=772593
2016-10-28 15:41:32 -02:00
Bastien Nocera
39a840e2c3 shell-app: Add "discrete_gpu" option when launching apps
And adapt existing callers to the new API. This will allow us to
implement a way to launch applications on the discrete GPU for systems
where an "Optimus" system exists.

https://bugzilla.gnome.org/show_bug.cgi?id=773117
2016-10-21 19:26:49 +02:00
Philip Chimento
ed99bef458 extensionUtils: Remove ShellJS library
You can define a new importer object by importing a subdirectory in GJS.
This is undocumented, but it is likely to at least hold until the whole
thing moves to ES6 modules, after which we'll be able to do this purely
in JS with Reflect.Loader.

Since this was the only thing the ShellJS library did, we can remove it
altogether.

This allows us to discontinue use of the gjs-internals-1.0 embedder API.

https://bugzilla.gnome.org/show_bug.cgi?id=772386
2016-10-17 12:36:16 -07:00
Florian Müllner
0c22a21a24 window-tracker: Consider Flatpak ID for window matching
Our window matching currently fails frequently with Flatpak
applications, as one of the primary hints used to link windows
with .desktop files - the WM_CLASS - no longer matches when
flatpak renames the exported .desktop file. Worse, as Flatpak
applications are run in their own PID namespace, different
apps frequently share a common _NET_WM_PID, resulting in
unrelated apps being grouped together by one of the fallback
paths. To match Flatpak applications reliably, take the newly
exported Flatpak ID into account.

https://bugzilla.gnome.org/show_bug.cgi?id=772615
2016-10-10 23:40:39 +02:00
Carlos Garnacho
a22e9ce9cd st: Ignore filtered selection events not meant to our clipboard window
Other windows like the mutter Xwayland selection bridges might deal with
the clipboard, which would result in events visible on st-clipboard event
filters.

In order to avoid unintended results, ignore events that are not meant for
the clipboard window.

https://bugzilla.gnome.org/show_bug.cgi?id=760745
2016-10-09 10:57:47 +02:00
Philip Chimento
f00826f3fb shell-js: Remove usage of deprecated API
This removes all usage of SpiderMonkey API that is deprecated in mozjs24
and will be removed in mozjs31.

https://bugzilla.gnome.org/show_bug.cgi?id=742249
2016-09-27 17:14:47 -07:00
Florian Müllner
3cd8dd0f32 global: Fix a small memory leak 2016-09-21 23:38:42 +02:00
Rui Matos
ff814df03a shell-screenshot: Avoid a crash when the cursor texture is NULL
Analogously to commit 2a7f9f70b8 for the
screen recorder, as a wayland compositor, the cursor texture might not
exist.

https://bugzilla.gnome.org/show_bug.cgi?id=771656
2016-09-19 22:41:51 +02:00
Florian Müllner
373ebb50eb Restore gvc submodule
Commit 68f439425b accidentally dropped the changes from the last
couple of months ...
2016-09-11 19:20:00 +02:00
Fran Dieguez
68f439425b Updated Galician translations 2016-09-11 00:35:39 +02:00
Olivier Fourdan
0b6c5b4620 systray: Bail out if the plug window is gone
Instead of crashing when deferencing a NULL pointer.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=755313
2016-09-08 12:08:02 +02:00
Jonas Ådahl
f9ef80749a recorder: Composite captured images before passing into gstreamer
Mutter may capture the screen in multiple capture regions. If this is
done, take these images and composite them onto one large image, which
is then passed into the gstreamer source.
2016-09-06 15:22:23 +08:00
Jonas Ådahl
22f0d3076e screenshot: Composite multiple captures into one image
When clutter gives us multiple captures (multiple cairo_surface_t's),
composite them into one large image and use that as final screenshot
result. This makes screenshooting work when mutter uses multiple views.

https://bugzilla.gnome.org/show_bug.cgi?id=770128
2016-09-06 15:22:23 +08:00
Timm Bäder
d658a5148a recorder: Print absolute path if output file can't be opened 2016-08-20 16:03:31 +02:00
Piotr Drąg
6e3bedb888 Add translator comments to .desktop files 2016-08-19 23:15:20 +02:00
Florian Müllner
795e7d4b59 build: Say good-bye to intltool
intltool is unmaintained nowadays while upstream gettext gained
support for formats like GSettings schemas and .desktop files,
and offers a mechanism to teach it about other XML formats not
yet supported out of the box which we can use for the rest.
So there's nothing stopping us, just make the switch ...

https://bugzilla.gnome.org/show_bug.cgi?id=769074
2016-08-19 22:13:14 +02:00
Florian Müllner
af5e65fd79 global: Make timestamp parameter unsigned
Negative values don't make sense to timestamps, and an unsigned
timestamp as returned by shell_global_get_current_time() or
Gdk/Clutter events may exceed the range of signed integers.

https://bugzilla.gnome.org/show_bug.cgi?id=769216
2016-08-11 09:04:22 +02:00
Carlos Garnacho
284cbf3ea7 shell: Remove shell_util_text_insert_keyval()
It is now unused.
2016-08-10 11:25:50 +02:00
Florian Müllner
6e0e37519d calendar-server: Add back missing return value
In commit 7e0e224e0, when moving from e_cal_recur_generate_instances()
to e_cal_client_generate_instances(), the return value of the
ECalRecurInstanceFn callback was accidentally removed; add it
back.

https://bugzilla.gnome.org/show_bug.cgi?id=769156
2016-07-25 18:55:22 +02:00
Jonas Ådahl
f5c058a036 Use clutter_stage_capture instead of cogl's read_pixels
There is no longer any guarantee that there'll be one single
framebuffer to read pixels from. In order to still read pixels from the
stage, use the new clutter_stage_capture API.

https://bugzilla.gnome.org/show_bug.cgi?id=768979
2016-07-20 14:15:32 +08:00
Florian Müllner
2f0039e7dd app: Add a construct-only app-info property
This will allow us to create a ShellApp from JS code, for instance
for .desktop files that aren't known to the AppSystem.

https://bugzilla.gnome.org/show_bug.cgi?id=762206
2016-07-13 01:28:13 +02:00
Florian Müllner
7e0e224e0e calendar-server: Use the actual recurrence ID of events
Instead of querying the client for a list of objects and using
e_cal_recur_generate_instances() to get occurrences for each of
them, we can use e_cal_client_generate_instances_sync() which
combines the functionality of both functions. This doesn't only
save us some lines of code (yay!), but also gives us access to
the real recurrence ID of an event, so we can get rid of the hack
of faking one.

https://bugzilla.gnome.org/show_bug.cgi?id=748226
2016-07-08 18:05:58 +02:00
Florian Müllner
35825cf0c7 calendar-server: Get recurrence ID from occurrences
We use the triplet of source ID, UID and recurrence ID to create
an ID to unambiguously identify an event, which we use to implement
hiding dismissed events from the calendar. However we currently
try to fetch the recurrence ID from the objects returned by
e_cal_client_get_object_list_sync(), which are always the primary
events with no recurrence ID. Instead, we need a recurrence ID
associated with each occurrence.

https://bugzilla.gnome.org/show_bug.cgi?id=748226
2016-07-08 18:05:57 +02:00
Florian Müllner
b2d79b6362 calendar-server: Fetch default zone from client
We are already setting the default zone on the client, no need
to pass it around.

https://bugzilla.gnome.org/show_bug.cgi?id=748226
2016-07-08 18:05:57 +02:00
Florian Müllner
f5e1dc86cd calendar-server: Fix a memory leak
App will take ownership of the location string when the timezone
changes, but not when there was no change - free the memory in
that case.

https://bugzilla.gnome.org/show_bug.cgi?id=748226
2016-07-08 18:05:57 +02:00
Florian Müllner
8c51f0076f calendar-server: Minor optimization
We use the same query string for all sources, so no need to
allocate/free it on each loop iteration.

https://bugzilla.gnome.org/show_bug.cgi?id=748226
2016-07-08 16:11:43 +02:00
Florian Müllner
61070e6ec0 calendar-server: Remove an unnecessary check
calendar_appointment_new() never returns %NULL, so no need to check
for it.
2016-07-07 15:54:57 +02:00
Owen W. Taylor
c4584c20dc run-js-test: fix running in hi-dpi mode 2016-06-30 14:17:19 -04:00
Rui Matos
2a7f9f70b8 shell-recorder: Avoid a crash when the cursor texture is NULL
When running as a wayland compositor, MetaCursorTracker might
legitimately not have a displayed cursor because e.g. a client unsets
the cursor surface.

Note that, under an X session, the assumption that the tracker always
has a cursor texture is true because XFixesGetCursorImage() always
returns data even if the cursor isn't visible.

https://bugzilla.gnome.org/show_bug.cgi?id=767001
2016-06-28 19:03:33 +02:00
Rui Matos
c91085caf7 shell-recorder: Ensure we remove the redraw timeout on finalize
Otherwise we may end up using freed memory and crashing

https://bugzilla.gnome.org/show_bug.cgi?id=767001
2016-06-28 19:03:32 +02:00
Rui Matos
3e93a1bdd6 StShadowHelper: properly use the actor's box to paint the shadow
We're using an unitialized box resulting in an undefined shadow box
size.

_st_paint_shadow_with_opacity() already computes the shadow's bounding
box from the source actor's box so we just need to pass that along.

https://bugzilla.gnome.org/show_bug.cgi?id=767954
2016-06-23 18:57:02 +02:00
Hans Petter Jansson
72bfa91259 theme-node: Fix leak on stylesheet change.
on_custom_stylesheet_changed() would set properties_computed to FALSE
without freeing the old properties, then the properties pointer would
be overwritten in ensure_properties().

https://bugzilla.gnome.org/show_bug.cgi?id=710230
2016-06-12 00:57:18 +02:00
Martin Szulecki
5226d8b086 st: Init framebuffer early to fix gnome-shell crash on NVIDIA drivers
Checking offscreen for COGL_INVALID_HANDLE is not sufficient,
as cogl_offscreen_new_with_texture doesn't initialize framebuffer
objects but lets Cogl solve this the lazy way.
cogl_offscreen_new_with_texture will never return COGL_INVALID_HANDLE
anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=764898
2016-05-17 15:00:04 +02:00
Florian Müllner
387f5143f0 st: Use case-insensitive shortcuts
For shortcuts that involve a letter (like <ctrl>c), we currently only
accept the lower-case variant. This makes shortcuts awkward to use when
caps-lock is active, and is inconsistent with GTK+, so accept upper-case
variants as well.

https://bugzilla.gnome.org/show_bug.cgi?id=766325
2016-05-12 18:10:04 +02:00
Florian Müllner
b7867fe44c build: Set rpath on more executables
We need to point executables to our private cogl/clutter forks.
Commit 093fd54e2 did this for the main executable, but forgot
the extension-prefs tool and other helpers.
2016-05-12 18:10:04 +02:00
Florian Müllner
84da49c715 app: Consider minimized windows for app comparisons
We used to take window visibility into account when comparing apps
until commit 1dfc38d078, following changes in the window switcher
due to auto-minimization. However auto-minimization was abolished
and the window switcher changes reverted, so it makes sense again
to sort apps without non-minimized windows last again.

https://bugzilla.gnome.org/show_bug.cgi?id=766238
2016-05-10 21:36:33 +02:00
Florian Müllner
093fd54e2b build: Point executables to our private lib path
We now link to cogl/clutter forks in a private location, so make
sure we set the rpath of executables to point the runtime linker
to the correct location.
2016-04-28 19:35:05 +02:00
Rui Matos
af28a219be Build with merged mutter/clutter/cogl
https://bugzilla.gnome.org/show_bug.cgi?id=760439
2016-04-27 20:19:59 +02:00
Florian Müllner
c97626e516 Update gvc submodule
https://bugzilla.gnome.org/show_bug.cgi?id=765607
2016-04-26 15:47:29 +02:00
Florian Müllner
8416ba25de st: Don't assert when corner texture creation fails 2016-04-15 19:05:04 +02:00
Florian Müllner
63f6ff9151 Do not skip CoglError parameters
While CoglError is a define to GError, it doesn't follow the convention
of ignoring errors when NULL is passed, but rather treats the error as
fatal :-(
That's clearly unwanted for a compositor, so make sure to always pass
an error parameter where a runtime error is possible

https://bugzilla.gnome.org/show_bug.cgi?id=765061
2016-04-15 18:22:18 +02:00
Florian Müllner
59c2ace98c st: Do not try to unref NULL CoglObjects
https://bugzilla.gnome.org/show_bug.cgi?id=765061
2016-04-15 18:22:18 +02:00
Florian Müllner
c039a3ddda recorder: Fall back to ~ if XDG_VIDEOS_DIR doesn't exist
Unlike screenshots, recordings fail when the default directory doesn't
exist. Fall back to home instead.

https://bugzilla.gnome.org/show_bug.cgi?id=765015
2016-04-13 21:25:31 +02:00
Aaron Plattner
941513b280 st: Fix offscreen leak if cogl_framebuffer_allocate fails
If cogl_framebuffer_allocate fails in _st_create_shadow_pipeline_from_actor, the
CoglOffscreen* that was allocated earlier in the function is leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=735705

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2016-03-30 15:59:10 -04:00
Ting-Wei Lan
1de288c5bb build: Fix build with clang -Werror
https://bugzilla.gnome.org/show_bug.cgi?id=755659
2016-02-26 02:06:55 +08:00
Michael Catanzaro
508668107b st-entry: Disable middle-click-paste when entry is not editable
Should only allow pasting the primary selection when the entry is
editable.

https://bugzilla.gnome.org/show_bug.cgi?id=762507
2016-02-23 06:48:50 -06:00
Florian Müllner
00814dd159 shell: Fix another indentation warning
The compiler doesn't know about preprocessor conditionals, so indentation
changes confuse -Wmisleading-indentation.
2016-02-16 18:05:14 +01:00
Florian Müllner
57f9ffcaa7 shell: Fix an indentation issue ...
...pointed out by GCC's new -Wmisleading-indentation warning.
2016-02-16 17:35:39 +01:00
Florian Müllner
ce83f378a5 shell: Fix coding style 2016-02-16 17:35:39 +01:00
Lubomir Rintel
346ffd14d7 NetworkAgent: correctly identify the VPN secret requests
The non-interactive requests for 'vpn' settings are forwarded to the UI because
it is able to talk to the auth helpers. However, the VPN requests are identified
by the connection type instead of setting type. That is incorrect and the UI
is not prepared to handle such requests; tries to construct a dialog and fails
miserably:

  Gjs-Message: JS LOG: Invalid connection type: vpn

  (gnome-shell:13133): Gjs-WARNING **: JS ERROR: Error: No property 'text' in property list (or its value was undefined)
  NetworkSecretDialog<._init@resource:///org/gnome/shell/ui/components/networkAgent.js:60
  wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110
  Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204
  NetworkAgent<._handleRequest@resource:///org/gnome/shell/ui/components/networkAgent.js:724
  wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  NetworkAgent<._newRequest@resource:///org/gnome/shell/ui/components/networkAgent.js:715
  wrapper@resource:///org/gnome/gjs/modules/lang.js:169

https://bugzilla.gnome.org/show_bug.cgi?id=760999
2016-01-26 17:31:34 +01:00
Rui Matos
c25c143b24 st-widget: Avoid passing NULL to atk_object_get_role()
This never worked since the code landed but apparently no-one noticed
until now.

The intent here is to return the accessible's default role if none has
been explicitly set on the StWidget instance.

https://bugzilla.gnome.org/show_bug.cgi?id=760945
2016-01-21 16:49:06 +01:00
Rui Matos
b87da87252 st-widget: Fix a potentially infinite recursion
Commit ffe4eaf00d changed this code to
call st_widget_get_accessible_role() instead of using the value
directly which would be an infinite recursion if that function didn't
have a bug. As it is, this just resulted in

CRITICAL **: atk_object_get_role: assertion 'ATK_IS_OBJECT
(accessible)' failed

https://bugzilla.gnome.org/show_bug.cgi?id=760945
2016-01-21 16:49:05 +01:00
Christophe Fergeau
021cecbce2 NetworkAgent: Fix double-unref in get_secrets_keyring_cb()
In get_secrets_keyring_cb, we own a ref on the 'attributes' hash table
from secret_item_get_attributes), and a ref on the 'secret' object (from
secret_item_get_secret(), but in the SHELL_KEYRING_SK_TAG case, we unref
these once before breaking out of the loop, and the second time after
breaking out of the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=759708
2016-01-07 15:27:42 +01:00
Florian Müllner
03bf6fa399 theme-node: Use the correct framebuffer in paint_* methods
Since commit 48a54e8ac4, paint() has an explicit framebuffer parameter,
however a couple of submethods are still using the draw framebuffer,
which breaks when rendering to an offscreen buffer.
2015-11-19 14:08:14 +01:00
Florian Müllner
f777e761c0 st: Fix some more cogl deprecations
Replace the remaining cogl_set_source* calls with the explicit
pipeline/framebuffer API.
2015-11-19 14:07:24 +01:00
Florian Müllner
9a7b47c23f st: Fix Gaussian kernel calculation
The result of subtracting unsigned operands is unsigned, which throws
off our calculation in case it should be negative.

This partly reverts 18b6f13395.

https://bugzilla.gnome.org/show_bug.cgi?id=757779
2015-11-12 01:02:05 +01:00
Florian Müllner
c634718dfa shell: Fix crash in polkit agent
The polkit agent does not take ownership of the request's cancellable,
so it may no longer be valid after the request finished and we need
to disconnect it before that. Before the GTask port in 8b4249ef2,
it was safe to do that when freeing the request data because requests
completed in an idle, but now we need to do it before returning the
task result.

https://bugzilla.gnome.org/show_bug.cgi?id=757668
2015-11-10 11:56:37 +01:00
Kalev Lember
df0b465e76 StTextureCache: Fix a fallout from GTask port
Set the task data that load_pixbuf_thread func expects.

https://bugzilla.gnome.org/show_bug.cgi?id=757418
2015-11-01 00:27:35 +01:00
Owen W. Taylor
8b7464c648 st_theme_node_prerender_shadow: guard against failure to allocate a texture
If we are trying to render a shadow at a size that is very large in one
direction, but small in the other direction (so that we don't 9-slice
the texture), then allocating the backing texture for the offscreen
buffer may fail due to texture-size limits. Don't crash in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=757150
2015-10-27 15:51:40 -04:00
Owen W. Taylor
6d22670307 Defend against failure of cairo_pattern_get_surface()
There are quite a few crashes in retrace.fedoraproject.org that are a result of
of cairo_pattern_get_surface() failing, then a subsequent call to
cairo_image_surface_get_width() crashing because no surface was returned to the
out parameter. Knowing what causes these is hard - my best guess is widgets getting
allocated at ridiculous sizes - but avoiding the crash makes sense in any case.

See https://bugzilla.redhat.com/show_bug.cgi?id=1206754

https://bugzilla.gnome.org/show_bug.cgi?id=756983
2015-10-22 15:14:55 -04:00
Owen W. Taylor
e65d90d624 Fix text-scaling-factor under wayland.
The text-scaling-factor GSetting was not being properly propagated
to clutter and the Pango font map; under X this is done by Clutter,
which listens to XSETTINGS directly.

https://bugzilla.gnome.org/show_bug.cgi?id=756447
2015-10-20 09:35:47 -04:00
Florian Müllner
48a54e8ac4 theme-node: Pass an explicit framebuffer to paint()
This allows us to paint to an offscreen buffer without using the
deprecated cogl_push_framebuffer/cogl_pop_framebuffer functions.
2015-10-16 00:16:38 +02:00
Florian Müllner
113a854048 st: Rename *material to *pipeline
... since the last commit changed the type from CoglMaterial to
CoglPipeline.
2015-10-15 23:42:19 +02:00
Florian Müllner
882f5fa79e st: Fix a bunch of cogl deprecations 2015-10-15 23:05:11 +02:00
Florian Müllner
9acdb8012c tray: Get rid of deprecation warnings
gdk_window_set_composited() is deprecated, and we don't need it as
we end up setting it to the default anyway.
We do need gtk_widget_set_double_buffered() though, which has been
deprecated as well because it is only meaningful on X11 - but so
is XEmbed, so just shut up that warning.
2015-10-15 23:05:11 +02:00
Florian Müllner
731d64e0e4 tray: Don't use gdk_display_supports_composite()
Composite is a hard requirement for mutter's compositor, so if we get
to the point of managing the tray, we already know that the extension
is supported. So let's get rid of yet another deprecation warning.
2015-10-15 23:05:11 +02:00
Florian Müllner
ccf1bd9f27 tray-manager: Don't use GdkColor
It has been deprecated for a while in favor of GdkRgba, though in our
case translating ClutterColors to an intermediate color type before
setting _NET_SYSTEM_TRAY_COLORS is a bit silly, so just move to
ClutterColor as the rest of the code base.
2015-10-15 23:05:11 +02:00
Florian Müllner
c164a8fe03 st: Use ClutterCanvas for StDrawingArea
Stop chasing down cogl deprecations by delegating all texture
handling to a ClutterCanvas.
2015-10-15 23:01:11 +02:00
Florian Müllner
1a39666f7c shell: Port to GTask 2015-10-15 22:59:49 +02:00
Florian Müllner
f2731d4d6a st: Port to GTask
GSimpleAsyncResult has been deprecated for a while.
2015-10-15 22:59:48 +02:00
Florian Müllner
3e63fb7abe Port screenshot to GTask 2015-10-15 22:59:48 +02:00
Florian Müllner
8b4249ef26 Port polkit agent to GTask 2015-10-15 22:59:48 +02:00
Florian Müllner
bf0be6ef12 hotplug-sniffer: Port to GTask
GSimpleAsyncResult is deprecated.
2015-10-15 22:59:48 +02:00
Florian Müllner
294702d3f1 shell: Use G_DECLARE_*_TYPE macros
Cut down on boilerplate by using the (no longer that) new helper
macros. We don't care about breaking ABI in private libraries, so
use G_DECLARE_FINAL_TYPE even where the class struct used to be
exposed in the header, except for types we inherit from ourselves
(obviously) or where the class exposes any vfuncs (where changes
could affect inheritance in extensions).
2015-10-15 22:58:28 +02:00
Florian Müllner
58f3b7c748 shell: Drop questionable vfuncs
Both ShellAppSystem and ShellTrayManager are used as singletons, which
significantly reduces the usefulness of inheritance - it's unlikely for
extensions to inherit from them anyway (AND use any of the vfuncs), so
drop them to allow defining the types as final in an upcoming commit.
2015-10-15 22:13:18 +02:00
Florian Müllner
e25502aeb2 shell: Use G_DEFINE_TYPE_WITH_PRIVATE() and friends 2015-10-15 22:03:06 +02:00
Florian Müllner
ffe4eaf00d st: Use G_DECLARE_*_TYPE
Cut down on boilerplate by using the (no longer that) new helper
macros. We don't care about breaking ABI in private libraries, so
use G_DECLARE_FINAL_TYPE even where the class struct used to be
exposed in the header, except for types we inherit from ourselves
(obviously) or where the class exposes any vfuncs (where changes
could affect inheritance in extensions).
2015-10-15 22:02:35 +02:00
Florian Müllner
2f88a7a1e1 st: Drop vfuncs from StThemeNodeTransition
They are unused, as we don't use them ourselves and the class is not
exposed to introspection. Drop them to allow defining the type as final
in an upcoming commit.
2015-10-15 21:43:08 +02:00
Florian Müllner
cd7d564125 st: Use G_DEFINE_TYPE_WITH_PRIVATE() and friends 2015-10-15 21:05:22 +02:00
Florian Müllner
ede81017ec hotplug-sniffer: Modernize GObject usage 2015-10-15 21:04:07 +02:00
Florian Müllner
a539e6236a calendar-server: Modernize GObject usage 2015-10-15 21:04:07 +02:00
Florian Müllner
508e751ffd box-layout: Support replacing layout manager
There is nothing preventing callers from replacing the internal
layout manager, and as long as the replacement is a (or derives
from) ClutterBoxLayout, everything should work fine except for
losing a bit of automatic property mapping - and the latter is
easily fixable by moving the setup out of the constructor.

https://bugzilla.gnome.org/show_bug.cgi?id=708472
2015-10-15 19:21:15 +02:00
Cosimo Cecchi
207c847762 windowManager: add animations for fullscreen and unfullscreen
We use the newly introduced feature from Mutter to hook up our own
fullscreen and unfullscreen animations.
To give the illusion of a transition as smooth as possible, we create a
snapshot of the current contents of the actor before its state is
changed, and crossfade between the two states while the size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=707248
2015-10-14 12:10:58 -04:00
Cosimo Cecchi
674ae262c8 Change incorrect parameter names
These were renamed a while ago.
2015-10-12 15:38:44 -04:00
Owen W. Taylor
db297e7fdb Don't crash on accesses to stale window-backed apps
The JS code could still be holding on to a reference to a window-backed app
after all windows have vanished. (For example, the dash queues an idle to
refetch apps and display them.) Avoid dying with an error message if we
attempt to activate or otherwise manipulate such a window.

https://bugzilla.gnome.org/show_bug.cgi?id=674799
2015-10-11 15:31:39 -04:00
Rui Matos
44047ac881 shell-glsl-quad: Set the pipeline blend string explicitly
The default pipeline color is opaque white and blending is turned
off. If we only draw with that color (e.g. because animations are
disabled and we're always drawn with opacity == 255), blending is kept
disabled since cogl_pipeline_set_color() returns early if the color
doesn't change from what was there before.

In our case we always want blending to be enabled which we can achieve
by setting the blending string ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=755827
2015-10-08 18:27:07 +02:00
Florian Müllner
464d5d8a13 st-button: Don't rely on hover to accept clicks
Since commit 4f1f226828 we only consider buttons clicked when the
release event had a corresponding press event. However as we use
the hover state to check whether a release event actually occurred
on the button, we dismiss any clicks in cases where we missed the
enter event - most likely due to some other actor holding a grab.
Instead, check whether the button contains the event's source, which
should be less error-prone.

https://bugzilla.gnome.org/show_bug.cgi?id=748919
2015-10-07 15:05:36 +02:00
Emmanuele Bassi
2036e4c85c st: Remove wrong indentation
GObject-Introspection started warning for wrong annotations, and
StGenericAccessible::set-current-value has a return value annotation
even if it returns nothing. This generates the warning:

src/st/st-generic-accessible.c:146: Warning: St:
StGenericAccessible::set-current-value: invalid return annotation

Which, coupled with fatal warnings, breaks the Shell build.
2015-10-05 12:04:55 +01:00
Matthias Clasen
18c7138237 Check error of g_dbus_proxy_new_sync call
Otherwise errors pile up and we crash later on.
2015-09-24 13:33:47 -04:00
Matthias Clasen
3f0fbae7e2 shell_dbus_acquire_name: Don't leak the result
The GVariant returned by g_dbus_proxy_call_sync must be
freed with g_variant_unref, to prevent a leak.
2015-09-24 13:33:47 -04:00
Matthias Clasen
7f1a258ff9 shell_dbus_acquire_name: Don't leak error
If fatal is not set, we return from this function in the error
case. Don't leak the GError if that happens.
2015-09-24 13:33:45 -04:00
Florian Müllner
84eda6e459 st: Don't avoid parameter list
Meh, C ...
2015-09-23 21:32:50 +02:00
Florian Müllner
f5e7530fc7 st: Add default case to switch statements 2015-09-23 21:32:50 +02:00
Florian Müllner
f983b34784 st: Handle all possible enum values in switch statements 2015-09-23 21:32:50 +02:00
Florian Müllner
36bbe64898 st: Fix constness in assignment 2015-09-23 21:32:50 +02:00
Florian Müllner
627a393ed6 st: Don't mix declarations and code 2015-09-23 21:32:50 +02:00
Florian Müllner
a025b151ef st: Don't shadow existing variables 2015-09-23 21:32:50 +02:00
Florian Müllner
18b6f13395 st: Fix signed-unsigned comparisons 2015-09-23 21:32:50 +02:00
Florian Müllner
051413550f st: Don't duplicate declarations from G_DEFINE_TYPE 2015-09-23 21:32:50 +02:00
Florian Müllner
3e10574736 shell: Add default case to switch statements
... to shut up a compiler warning.
2015-09-23 21:32:50 +02:00
Florian Müllner
9a3041004b shell: Don't shadow existing variables 2015-09-23 21:32:50 +02:00
Florian Müllner
87f71b8ce1 shell: Don't mix declarations and code 2015-09-23 21:32:50 +02:00
Florian Müllner
825146f1e3 shell: Fix signed-unsigned comparisons 2015-09-23 21:32:50 +02:00
Florian Müllner
52995416fd shell: Don't avoid parameter list
Meh, C ...
2015-09-23 21:32:50 +02:00
Florian Müllner
6c43d0247a main: Fix constness mismatches 2015-09-23 21:32:49 +02:00
Florian Müllner
9aa98d9f0c menutracker: Don't shadow existing variables 2015-09-23 21:32:49 +02:00
Florian Müllner
c3a29d6df1 theme-node: Rewrite switch statement
Some compilers warn about unhandled enum values in switch statements,
so don't use one where only two out of 21 possible values make sense.
2015-09-23 21:32:49 +02:00
Florian Müllner
82f84416a9 recorder: Rewrite switch statement
Avoid compiler warnings about unhandled enum values by using a
regular if-else statement.
2015-09-23 21:32:49 +02:00
Florian Müllner
9dd3162dbe recorder-src: Rewrite switch statement
Avoid compiler warnings about unhandled enum values by using a
regular if-else statement.
2015-09-23 21:32:49 +02:00
Florian Müllner
7ef519756a Update gvc submodule 2015-09-23 21:32:49 +02:00
Florian Müllner
444fa2e0ab calendar-server: Adjust to EDS service version bump 2015-08-10 17:30:38 +02:00
Florian Müllner
e92f43b83e shell: Fix C99'ism 2015-07-31 20:26:47 +02:00
Florian Müllner
fed79ce4e6 appDisplay: Handle non-UTF8 filename encodings more gracefully
It may be 2015, but users still stumble upon the occasional .desktop
file that uses a filename encoding other than UTF-8. We currently
fail quite spectacularly in that case by not displaying any apps at
all - handle this case more gracefully, by only filtering out the
offending apps.

https://bugzilla.gnome.org/show_bug.cgi?id=651503
2015-07-31 16:52:42 +02:00
Florian Müllner
c3e5d983b9 st: Replace deprecated key symbols 2015-07-22 16:00:56 +02:00
Florian Müllner
d21edcfed5 st: Replace deprecated macros 2015-07-22 16:00:55 +02:00
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