Commit Graph

2120 Commits

Author SHA1 Message Date
Florian Müllner
a49fb90d86 build: Include Cally in St introspection
CallyActor is exposed indirectly via StAccessible's parent type,
so add the dependency to shut up a gjs warning.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2018-05-07 21:10:40 +00:00
Milan Crha
0932324d39 calendar-server: Update views only after the time range is set
The gnome-shell-calendar-server calls to refresh queries even when it
has no time range set, which results in:
  a) waste of resources (for example after login),
  b) many runtime warnings in the journalctl log, related to
     incorrect time range being used.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/244
2018-05-02 16:10:33 +02:00
Yussuf Khalil
2d6cf236c4 perf-tool: Fix default value for --extra-filter
While it is theoretically fine to run --perf=hwtest without passing --hwtest,
the test will hang in this case because it fails to start gedit. Always append
Gedit to the default value for --extra-filter when running the "hwtest" test
to make it work fine without --hwtest.
2018-04-29 16:15:16 +00:00
Mario Sanchez Prada
be76b19300 st-entry: Set text-related CSS properties on the internal ClutterText
Call _st_set_text_from_style() when updating the entry's style, so
that CSS style properties such as text-decoration or letter-spacing
are applied over the internal ClutterText instance.
2018-04-18 00:14:05 +00:00
Mario Sanchez Prada
376d696b8b st-private: Add support for letter-spacing in ClutterText based StWidgets
Add support in _st_set_text_from_style(), so that this CSS property can
be used from any StWidget holding an internal ClutterText.
2018-04-18 00:14:05 +00:00
Mario Sanchez Prada
695d61968d st-theme-node: Add new getter st_theme_node_get_letter_spacing
This will be used by ClutterText-backed StWidgets to update their
list of PangoAttributes according to the letter-spacing property.
2018-04-18 00:14:04 +00:00
Florian Müllner
f6a08472a0 st: Do not force allocation updates during shadow creation
If an actor is pending a relayout when get_allocation_box() is called,
the method forces an allocation update. In case of StWidget, this might
then result in a style update and a consecutive invalidation of the
shadow spec.

A helper method that invalidates one of its parameters as a side effect
(and by extension its return value as well) is most unexpected, so cur-
rently _st_create_shadow_pipeline_from_actor() poses an easy trap to
callers to run into.

Remove that trap by calling get_size()/get_position() instead, which
don't have the unintended side effect - it is still a good idea to fix
callers who were running into this to not waste resources on creating
shadows that are invalidated before the next paint, but throwing un-
defined behavior at them is harsh ...

https://bugzilla.gnome.org/show_bug.cgi?id=788908
2018-04-11 19:29:25 +00:00
Carlos Garnacho
4a17c8f4a9 shell-global: Do not deal with allocated strings as const char
The imagedir and userdatadir variables are not fetched from
constants/environment but created with g_strdup*/g_build*. Acknowledge that
and also free the strings in finalize.
2018-03-14 13:30:47 +00:00
Florian Müllner
c8e69a2154 menutracker: Fix a small memory leak
https://gitlab.gnome.org/GNOME/gnome-shell/issues/64
2018-03-02 19:43:45 +00:00
Florian Zwoch
6f0c187cf4 shell-recorder: save cursor's image hot x/y coordinates
Whenever a new cursor image is loaded also save it's hot x/y
coordinates. The drawing code already respects these values, however
they were never set. This change will place the cursor image at the
correct location as seen on screen. shell-screenshot.c served as
reference.

https://bugzilla.gnome.org/show_bug.cgi?id=792860
2018-02-07 13:16:36 +01:00
Carlos Garnacho
8c3f5b615f shell: Remove gdk_screen property/getter
It's used nowhere.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
d1bebba77a shell: Remove intricate key event handling code
We no longer need to do contortions with key events, as Clutter
key events will be already handed to IMs through ClutterInputMethod.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
83accce24e st: Remove StIMText
It is entirely unused now.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
d86b62d1b7 st: Make StEntry rely entirely on ClutterInputMethod/Focus
StIMText is no longer needed here.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
3dd3c1ac34 st: Make st_button_fake_release() work with touch press
The st_button_release() call wouldn't happen because StButton does not
set priv->button_mask on touch events. And if we make it called, we can't
try to unset the device grab at the end of the function, as device/sequence
are unset earlier on.
2018-02-05 17:46:57 +01:00
Carlos Garnacho
40db4a6795 main: Stop acquiring caribou name
This is not necessary anymore.
2018-02-05 17:46:57 +01:00
Florian Müllner
2d79ab6c5c private: Avoid unnecessary conversions in shadow computation
The type was changed from double to float for no apparent reason
when moving code in commit 5060081db5.

https://bugzilla.gnome.org/show_bug.cgi?id=788627
2018-02-05 11:09:01 -05:00
Lubomir Rintel
d71af5e579 network: port to libnm
The libnm-glib is depreacted for a long time already.

https://bugzilla.gnome.org/show_bug.cgi?id=789811
2018-01-12 11:48:49 +01:00
Florian Müllner
3f3e514ff2 networkAgent: Update VPN config path
The location moved a while ago, so update the path to point to
the non-deprecated location.

https://bugzilla.gnome.org/show_bug.cgi?id=791487
2018-01-09 00:25:46 +01:00
Marco Trevisan (Treviño)
891bc45e36 main: use SA_NODEFER to track signals to being able to raise from alarm
After we receive one of the tracked signals, in case we get stuck inside
the gjs_dumpstack () call, we use an alarm to raise the previously emitted
signal, however without using SA_NODEFER, the raise inside the alarm handler
will be ignored.

To avoid to handle new signals caused by the handler calls, once we get the
first signal, we just ignore them all as they could only lead to dirty traces.

Also, cleaning up a bit the code, and disabling the shell log handler
in dump_gjs_stack_alarm_sigaction since this might lead to a new
gjs_dumpstack () request.

https://bugzilla.gnome.org/show_bug.cgi?id=789237
2017-10-24 14:18:45 +08:00
Marco Trevisan (Treviño)
f90b225eaa main: call gjs_dumpstack on aborts and traps and optionally on segfaults
In order to debug issues triggered by JS code we might need to
see the stack of it, this is not normally visible in static stack traces,
thus we need to call gjs_dumpstack () before dying the process.

Intercepting signals SIGABRT, SIGTRAP (needed for catching fatal glib
errors) SIGFPE and SIGIOT by default, while introducing a new
'backtrace-segfaults' flag for the SHELL_DEBUG environment variable to
do the same on SIGSEGV and SIGBUS (this is a precaution to avoid that we
corrupt the stack for automatic errors trackers).

In any case after dumping the stack we raise the signal again, in order
to make the system aware of it.

https://bugzilla.gnome.org/show_bug.cgi?id=789237
2017-10-23 05:05:51 -05:00
Marco Trevisan (Treviño)
f9569912df window-tracker: use generic meta_window_get_sandboxed_app_id
This is valid for both Flatpak's and snaps now, we can use a more generic
API then.

https://bugzilla.gnome.org/show_bug.cgi?id=789277
2017-10-21 13:37:13 -05:00
Mario Sanchez Prada
b5f5a594ba shell-app: Don't transition to STOPPED while still in the STARTING state
Similar to what it's done in _shell_app_add_window(), rely on calling
shell_app_sync_running_state() when removing windows too, to avoid
transitioning to STOPPED while it's still in the STARTING state.

This makes the logic compliant with the startup notification spec and
prevents stopping an application too early if it has a splash screen
that has been closed before the application's main window is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=787905
2017-09-29 18:10:23 +01:00
Florian Müllner
ab0e98dfdd build: Use new mkenums_simple() function
As most libraries use the same mkenums templates, meson now added a
mkenums_simple() variant that works without providing the template.

https://bugzilla.gnome.org/show_bug.cgi?id=786343
2017-09-22 17:43:54 +02:00
Florian Müllner
2ae63691e9 meson: Use build_rpath instead of custom linker args
Meson now warns when specifying the rpath in linker flags instead
of using the newly added build_rpath option - now that we already
depend on the latest release, there's no reason anyway to not use
the nicer syntax.

https://bugzilla.gnome.org/show_bug.cgi?id=786343
2017-09-22 17:43:54 +02:00
Florian Müllner
7f381dd2fe st-icon: Remove some dead code 2017-09-22 17:43:54 +02:00
Florian Müllner
7015bb2ca9 shadow: Only use correctly sized textures for shortcut
When creating a shadow for a ClutterTexture, we currently use the
underlying CoglTexture directly instead of rendering the actor to
an offscreen buffer. This assumes that the CoglTexture is directly
suitable as shadow source, which isn't necessarily the case - it
may have a very different size than what is shown and scaled up or
down by the hardware. In that case we end up with a scaled shadow
texture as well, which messes up the desired blur effect - the
result will be too light when scaling up, or too sharp when scaling
down. To fix this, only take the shortcut when a ClutterTexture's
underlying texture has the correct size and fall back to offscreen
rendering otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=788039
2017-09-22 17:11:28 +02:00
Ray Strode
90c55e1977 gtk-embed: ensure we only listen for window-created events once
If a tray icon gets a mapped and unmapped and the mapped again
in quick succession, we can end up with multiple handlers
listening for window creation events.

This commit tries to guard against that by only listening for
window-created events when we don't  know the actor associated
with the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=787361
2017-09-15 15:32:46 -04:00
Marc-Antoine Perennou
5ec0ad4e9c StEntry: fix crash when hint actor is NULL
https://bugzilla.gnome.org/show_bug.cgi?id=787580

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-09-12 21:39:30 +02:00
Florian Müllner
053b8da89c app: Work around pkexec restriction when launching
Unless automatic child reaping is disabled in GSpawnFlags, glib's
g_spawn_* functions will reparent the spawned process to init by
double-forking. Unfortunately pkexec bails out in this case[0],
which means that it no longer works in .desktop files since the
PID tracking removal in commit 01c6392c13.
Fix this by going back to manual child reaping.

[0] https://cgit.freedesktop.org/polkit/tree/src/programs/pkexec.c#n728

https://bugzilla.gnome.org/show_bug.cgi?id=763531
2017-09-12 17:32:51 +02:00
Jonas Ådahl
6fc5b0477b theme-node: Fix font family formatting
Unlike pango_font_description_from_string(),
pango_font_description_set_family() requires a already properly
formatted font family string. The proper format is a comma seperated
list of font families, but we generated a "comma space" separated list.
Passing a incorrectly formatted font family string to pango seems to
cause wierd issues, where the wrong font is sometimes selected.

For example, this fixes a font selection issue on zh_TW.UTF-8 locale for
chinese characters, where previously the "Droid Sans" font was selected
instead of "Source Han Sans TW" even though fontconfig had placed
"Source Han Sans TW" before "Droid Sans".

https://bugzilla.gnome.org/show_bug.cgi?id=786868
2017-09-04 17:47:35 +08:00
Florian Müllner
b5d3c4e165 shell-tray-manager: Disconnect theme_widget signals on finalize
The theme widget passed to shell_tray_manager_manager_screen() is simply
a means to receive style information. There is nothing which ties the two
object's life cycles together, so it is entirely possible for the tray to
be finalized with the widget still around - we shouldn't try to update the
stale object on widget style changes, so make sure we properly disconnect
the signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=786526
2017-08-20 18:03:32 +02:00
Florian Müllner
9fc6caeffb build: Only include enum header in libst dependency
Compiling the generated source for each consumer of the dependency
means we end up trying to register the enum types multiple times,
resulting in a fatal failure on startup. Luckily code outside libst
itself only depends on the header, which doesn't cause those issues.
2017-08-11 17:27:24 +02:00
Florian Müllner
79eedd93ab build: Rename variable for clarity
st_built_sources contains the source and header generated by mkenums,
not any other generated sources. Clarify that in the name, as we are
about to use source and header separately.
2017-08-11 17:27:24 +02:00
Emmanuele Bassi
7992d7c9b3 Add an explicit dependency on libst
This should ensure that the St enumeration header is available by the
time we start building the gnome-shell executable.
2017-08-11 00:21:40 +01:00
Emmanuele Bassi
86995d724e build: Use internal dependencies
We cannot rely on any build order, except the one we specify ourselves.

St depends on various generated files; other targets depend on those
files existing, so they can be included. There is no direct relationship
between targets and files, unless we declare a dependency, using the
Meson declare_dependency() constructor — which allows us to replace the
various `link_with` directives with the more appropriate `dependencies`
one, and also allows us to specify sources that must exist by the time
we build those targets.
2017-08-10 23:30:42 +01:00
Emmanuele Bassi
b0d21c3a37 Define ST_COMPILATION in the St enumeration template
In parallel builds we may end up with st-enum-types.c being built inside
separate targets outside of src/st which may not have the ST_COMPILATION
pre-processor symbol defined. For this reason, we need to define it
ourselves in the source file, before including other headers, to avoid
the single-include guard.
2017-08-10 23:27:56 +01:00
Florian Müllner
6d704cddea build: Remove included Makefiles as well
Whoops, missed those ...
2017-08-10 21:36:59 +02:00
Mario Sanchez Prada
1518a778ed main: Add private libdirs to GIR's list of search paths for scanned libraries
This is not strictly necessary when linking the shell with DT_RPATH as
the runtime paths will be extracted from the introspected libraries and
used from gobject introspection to find them when loading them based on
the typelib files, but when linking with DT_RUNPATH, as it's the case
for some linkers (e.g. ld.gold, or ld.bfd in some distros like Debian).

By explicitly prepending this directory as a library path for GIR, we're
making sure that the wrapped shared objects installed in Mutter's and
GNOME Shell's private directories can be found in all cases.

https://bugzilla.gnome.org/show_bug.cgi?id=777519
2017-08-10 20:48:07 +02:00
Florian Müllner
cf010cfd8f build: Drop autotools support
Complete the switch to meson and drop autotools support ...

https://bugzilla.gnome.org/show_bug.cgi?id=785153
2017-08-10 20:16:06 +02:00
Florian Müllner
dff3e4e0b9 ui: Add InhibitShortcutsDialog
https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:27:42 +01:00
Florian Müllner
c987d3d2c9 build: Support the meson build system
Meson is on track to replace autotools as the build system of choice,
so support it in addition to autotools. If all goes well, we'll
eventually be able to drop the latter ...

https://bugzilla.gnome.org/show_bug.cgi?id=783229
2017-07-20 00:20:54 +02:00
Florian Müllner
7f4e914b00 build: Move gvc submodule to /subprojects/gvc
When using the meson build system, gvc will be built as a subproject.
As meson restricts submodules to a subprojects/ directory in the
source tree root, move the submodule there.

https://bugzilla.gnome.org/show_bug.cgi?id=783229
2017-07-19 21:24:08 +02:00
Carlos Garnacho
d220e353e0 ui: Implement "window doesn't respond" dialog on gnome-shell
This does allow us to use ClutterActors instead of lousy legacy tools
meant for shell scripting.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 19:28:57 +02:00
Alessandro Bono
330a28742f shell-util: Fix a typo 2017-07-14 23:38:52 +02:00
Florian Müllner
bcec9f35d5 util: Wrap g_regex_escape_string() 2017-07-14 22:40:25 +02:00
Marco Trevisan (Treviño)
4c2fd513f4 shell-util: ensure we've a valid n_captures when capturing images
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
Jonas Ådahl
b099e9a69c shell-util: Fix capturing scaled views
libmutter-clutter fixed stage capturing when views are scaled, and for
that to work properly when compositing the screenshot, we need to deal
with the cairo device scale here too.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
Jonas Ådahl
5962be3904 shell-global: Don't set the clutter font DPI
The clutter font DPI is managed by libmutter.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
Jonas Ådahl
b18735da52 shell-global: Don't override the X11 window scale
It's already done by libmutter.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00