summaryrefslogtreecommitdiff
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* color: Fix smearing out of Night Light effectFlorian Müllner2017-07-061-1/+1
| | | | | | | | | | The interpolation function expects factor values between 0. and 1., so we need to either pass the difference between current time and transition start, or between transition end and current time - not the difference between transition start and current time, which is always negative. https://bugzilla.gnome.org/show_bug.cgi?id=778667
* tz.c: compiler warning: implicit declaration of function ‘islower’Alan Coopersmith2017-06-121-0/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=783641 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* media-keys: Show kbd-brigthness osd on ↵Hans de Goede2017-05-251-0/+28
| | | | | | | | | | | | | | | | | | | | org.gnome.SettingsDaemon.Power.Keyboard.BrightnessChanged signal If we receive an org.gnome.SettingsDaemon.Power.Keyboard.BrightnessChanged signal and the source of the change is "internal", show the kbd-brigthness osd. This makes the kbd-brigthness osd properly show up on laptops with hardwired keyboard backlight brightness hotkeys (which don't emit input events). Note this requires an updated kernel [1] and upower [2] which actually emit org.freedesktop.UPower.KbdBacklight.BrightnessChangedWithSource on such laptops. [1] https://patchwork.kernel.org/patch/9544111/ [2] https://bugs.freedesktop.org/show_bug.cgi?id=98404 https://bugzilla.gnome.org/show_bug.cgi?id=773405
* power: Add org.gnome.SettingsDaemon.Power.Keyboard.BrightnessChanged signalHans de Goede2017-05-251-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | Currently org.gnome.SettingsDaemon.Power.Keyboard consumers can monitor brightness changes through org.freedesktop.DBus.Properties' PropertiesChanged signal. We want gsd-media-keys-manager to show the OSD when gsd-power-manager detects the keyboard brightness was changed by firmware handled hotkeys through receiving an org.freedesktop.UPower.KbdBacklight.BrightnessChanged signal. But we do not want to show the OSD a second time when the hotkeys where handled by gsd-media-keys-manager itself, or when the brightness was changed through the slider in the control-panel. Therefore we need to be able to identify the source of the brightness change in gsd-media-keys-manager, which the PropertiesChanged signal does not give us. This commit adds a new BrightnessChanged signal to the org.gnome.SettingsDaemon.Power.Keyboard interface, which has both a value and a source argument providing the data gsd-media-keys-manager needs to properly show the OSD. https://bugzilla.gnome.org/show_bug.cgi?id=773405
* power: Monitor ↵Hans de Goede2017-05-251-0/+33
| | | | | | | | | | | | | | org.freedesktop.UPower.KbdBacklight.BrightnessChangedWithSource signal Monitor org.freedesktop.UPower.KbdBacklight.BrightnessChangedWithSource signal. Along with kernel[1] and upower[2] changes, this will make the slider in the Power Settings panel respond to brightness changes caused by pressing backlight buttons that change the brightness directly. [1] https://patchwork.kernel.org/patch/9544111/ [2] https://bugs.freedesktop.org/show_bug.cgi?id=98404 https://bugzilla.gnome.org/show_bug.cgi?id=773403
* color: Make the testcase able to run uninstalledIain Lane2017-05-192-1/+16
| | | | | | | | | Distributions might want to be able to run their tests during package builds, for example. Compile the schema and set GSETTINGS_SCHEMA_DIR to the build dir. https://bugzilla.gnome.org/show_bug.cgi?id=782170
* media-keys: Add support for new XF86RFKill keysymHans de Goede2017-05-151-0/+1
| | | | | | | | | | | | | | | ...and map it to RFKILL_KEY. This depends on a X-server + libX11 or libxkbcommon which actually support the XF86RFKill keysym and a xkeyboard-config which contains a binding for it. Specifically the following changes are needed: https://cgit.freedesktop.org/xorg/proto/xproto/commit/?id=98a32d328e7195e12c38baa877917335bceffbaf https://github.com/xkbcommon/libxkbcommon/commit/939d0909a427bdb076dfbba4ccce440391c6b308 https://patchwork.freedesktop.org/patch/156341/ See https://bugzilla.gnome.org/show_bug.cgi?id=760517 https://bugzilla.gnome.org/show_bug.cgi?id=781505
* power: Choose correct backlight device on laptops with hybrid graphicsHans de Goede2017-05-091-1/+35
| | | | | | | | | | | On laptops with hybrid graphics the LCD panel may be connected to a mux so that it can be driven by either GPU. In this case both GPU drivers will register a raw backlight interface for their LCD panel connector and g-s-d needs to pick the one for the enabled connector rather then just picking the first one. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1683445 https://bugzilla.gnome.org/show_bug.cgi?id=782211
* rfkill: Inhibit rfkill-input's rfkill keys handlingBenjamin Berg2017-05-041-0/+10
| | | | | | | | Disable the kernel's handling of rfkill input events when the session is active, so that multiple logins of GNOME, or use of any sessions without this handling can fall back onto the kernel's support. https://bugzilla.gnome.org/show_bug.cgi?id=760517
* rfkill: Add property to Rfkill helper to inhibit kernel handlingBenjamin Berg2017-05-042-0/+118
| | | | | | | | The kernel will handle input events by default which is causing race conditions and can for example make it impossible to disable airplane mode again. Add API to allow disabling the kernel handler. https://bugzilla.gnome.org/show_bug.cgi?id=760517
* housekeeping: Add rootfs to the list of ignored filesystemsJonh Wendell2017-04-291-0/+1
| | | | | | | | Update the list of ignored filesystems to include rootfs include rootfs, which is always present and is a duplicate of an actual filesystem mount point. https://bugzilla.gnome.org/show_bug.cgi?id=704702
* housekeeping: Ignore GPFS mountsOndrej Holy2017-04-291-0/+1
| | | | | | | | GPFS mounts cause false low free space alerts, let's ignore them. See: https://bugzilla.redhat.com/show_bug.cgi?id=1392260 https://bugzilla.gnome.org/show_bug.cgi?id=708786
* media-keys: Fix mmkeys D-Bus API to match API docsBastien Nocera2017-04-241-0/+12
| | | | | | | | | | | | | | | | | | Bizarrely, since 2011, gnome-settings-daemon was documented as using org.gnome.SettingsDaemon.MediaKeys D-Bus name, but everybody ended up using the org.gnome.SettingsDaemon owned by the daemon instead, and never reported the discrepancy. This fixes the code to match the 6-year old API as documented by owning the org.gnome.SettingsDaemon.MediaKeys. The portion of this patch adding the org.gnome.SettingsDaemon.MediaKeys name owning will need to be backported as far as reasonably possible by distributions, and all users of the API changed before GNOME 3.26. This would obviously have been easier if the problem was reported when detected, committer of this fix included. https://bugzilla.gnome.org/show_bug.cgi?id=781326
* common: Fix plugin whitelist for gdmRay Strode2017-04-212-24/+24
| | | | | | | | | | The plugin names don't have a gsd- prefix, so the login screen is currently getting started with no plugins! This commit fixes that, and as a consequence, fixes hidpi scaling for the login screen. https://bugzilla.gnome.org/show_bug.cgi?id=780208
* power: Fix D-Bus proxy errors in testBastien Nocera2017-04-111-12/+24
| | | | | | | | | Despite the object already having an object path associated, we apparently need to pass it again to D-Bus calls. This fixes errors such as: DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface '(null)' on object at path /org/gnome/SessionManager when calling "Inhibit" or "Uninhibit".
* media-keys: Remove special handling of "active" GSettings keyBastien Nocera2017-04-111-4/+0
|
* xsettings: Remove special handling of "active" GSettings keyBastien Nocera2017-04-111-2/+1
|
* media-keys: Memory leaks and Bluetooth handling fixesBastien Nocera2017-04-061-0/+0
|
* color: Potentially fix sunrise calcs for fractional timezone offsetsPhilip Withnall2017-03-292-1/+23
| | | | | | | | | | | If a timezone is offset by a non-integer number of hours, the value of tz_offset would be truncated. Fix that by casting to double first. Add a unit test for it. Coverity ID: 1418246 https://bugzilla.gnome.org/show_bug.cgi?id=780587
* rfkill: Refactor error handling for cc_rfkill_glib_open()Philip Withnall2017-03-293-12/+21
| | | | | | | | | | | | | Returning the FD is a bad idea, since ownership of it is already transferred to the GUnixInputStream inside rfkill-glib.c. The only caller (in gsd-rfkill-manager.c) doesn’t use the return value anyway. Tidy this up a bit by using a GError instead. This changes how warning messages are printed, but otherwise introduces no functional changes. Coverity ID: 1418249 https://bugzilla.gnome.org/show_bug.cgi?id=780587
* housekeeping: Ignore return value from mkdir() callsPhilip Withnall2017-03-291-2/+2
| | | | | | | | | | We don’t care whether they succeed, since there’s nothing we can do if they fail. Notifying the user is fairly pointless, since not having the directories around doesn’t result in a major loss of functionality. Coverity ID: 1418240 https://bugzilla.gnome.org/show_bug.cgi?id=780587
* power: Fix signed/unsigned assignment and comparisonPhilip Withnall2017-03-291-3/+4
| | | | | | | | | The value retrieved from GSettings is a gint, so don’t implicitly cast to to a guint before clamping it to a non-negative value. Coverity ID: 1418248 https://bugzilla.gnome.org/show_bug.cgi?id=780587
* clipboard: Fix potential divisions by zeroPhilip Withnall2017-03-291-3/+14
| | | | | | | | | | | If handling an unknown format of X data, the bytes_per_item will be calculated as zero, which will cause a division by zero. Return early in those cases. Coverity IDs: 1418241, 1418244 https://bugzilla.gnome.org/show_bug.cgi?id=780587
* Revert "plugins: Work-around startup deadlock"Bastien Nocera2017-03-282-8/+0
| | | | | | | | | This reverts commit e5c6735c6b9ed4fc6466d3ea1aac3838ffbb6695 as the fix is now in GLib/GIO proper. This requires a newer GLib version though. See https://bugzilla.gnome.org/show_bug.cgi?id=674885#c78
* common: avoid loading Adwaita CSS theme into memoryChristian Hergert2017-03-285-0/+78
| | | | | | | | | | | | | | | The various Gtk programs are not dependent on any specific theme being loaded. Therefore, the parsing the Adwaita CSS theme (which is quite a detailed theme) is unnecessary and a few MB of overhead to each gsd subprocess. By setting the GTK_THEME environment variable in main() and providing an alternate CSS file (which is empty), we can force Gtk to never load the default theme, but instead our empty theme. This is important as otherwise GtkSettings can force-load Adwaita upon first use, and that fragments the heap. https://bugzilla.gnome.org/show_bug.cgi?id=780555
* wacom: Don't init GTK+Bastien Nocera2017-03-281-1/+1
| | | | | | We don't use it. https://bugzilla.gnome.org/show_bug.cgi?id=780555
* print-notifications: Don't init GTK+Bastien Nocera2017-03-281-1/+1
| | | | | | We don't use it. https://bugzilla.gnome.org/show_bug.cgi?id=780555
* housekeeping: Don't init GTK+Bastien Nocera2017-03-281-1/+1
| | | | | | We don't use it. https://bugzilla.gnome.org/show_bug.cgi?id=780555
* print-notifications: Remove unused enumBastien Nocera2017-03-281-4/+0
|
* media-keys: Make calculator key work againBastien Nocera2017-03-211-1/+1
| | | | | | | | gnome-calculator's .desktop name changed to org.gnome.Calculator.desktop for GNOME 3.24. We'll remove the gcalctool.desktop usage though, as gnome-calculator was renamed from that in 2012. https://bugzilla.gnome.org/show_bug.cgi?id=780348
* plugins: Work-around startup deadlockBastien Nocera2017-03-152-0/+8
| | | | | | | | | A number of the plugins/daemons fail to startup because of a deadlock in initialising GDBus-related GObject types. See https://bugzilla.gnome.org/show_bug.cgi?id=674885 https://bugzilla.gnome.org/show_bug.cgi?id=774813
* color: Fix typo in function nameBastien Nocera2017-02-161-4/+4
| | | | s/tempertature/temperature/
* color: Smooth the transition between different temperature valuesRichard Hughes2017-02-163-3/+89
| | | | | | | | This makes the effect less jarring when enabling or disabling in the control center or shell. This and also means we transition nicely when adjusting the times in manual mode. https://bugzilla.gnome.org/show_bug.cgi?id=778689
* rfkill: Add a comment with basic testing instructionsPhilip Withnall2017-02-141-0/+20
| | | | | | | | | | As much as I would love to, I don’t have time to write a unit testing harness which mocks up a slow rfkill FD. So this will have to do. Suggestion: run it in a tight loop, alternating between enabled and disabled. See what breaks. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Fix crash due to racy GTask managementPhilip Withnall2017-02-141-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | The change_all_timeout_id and task members of CcRfkillGlibPrivate are not necessarily both set and unset at the same time: it’s normal for (task != NULL) when (change_all_timeout_id == 0), when the code is doing its initial write before write_change_all_done_cb(); and when the code is doing its second write attempt before write_change_all_again_done_cb(). However, the code was checking (change_all_timeout_id != 0) to see if a task was pending when cc_rfkill_glib_send_change_all_event(). If a previous task was still in the middle of a write, this would result in its GTask being overwritten with the new GTask. When the first task’s write completed, it would then clear the second GTask. When the second task’s write completed, it would try to access the second GTask, and find it was NULL, causing a crash. This can happen on systems where the rfkill subsystem is slow (and hence blocks on writes for tens or hundreds of milliseconds); for example, if rfkill passes through a GPIO. Fix this by: • checking whether (task != NULL) to see if a task is in flight; and • only clearing priv->task if it matches the callback’s task. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Move event data into the GTask’s task dataPhilip Withnall2017-02-141-11/+14
| | | | | | | | This simplifies lifecycle management of the event struct. It always had the same lifecycle as the GTask already, so there are no functional changes; just code simplification. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Use local task variables where possiblePhilip Withnall2017-02-141-8/+12
| | | | | | | | | In order to keep the binding between a GTask object and a control flow, use the GTask passed as the user_data to the callbacks as much as possible, rather than referring back to the global GTask which might have changed in the mean time. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Remove stored GCancellable memberPhilip Withnall2017-02-141-6/+2
| | | | | | | There’s no need to store it separately from the GTask, as the GTask keeps a pointer to it. This introduces no functional changes. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Add some checks that a previous task is not overwrittenPhilip Withnall2017-02-141-0/+6
| | | | | | | These should not fail, as write_change_all_timeout_cb() clears those variables — so they’re more for documentation than anything else. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Update class definition to use G_DECLARE_FINAL_TYPEPhilip Withnall2017-02-142-97/+61
| | | | | | | Tidy up the code a bit. This drops the CcRfkillGlibClass.changed signal handler vfunc, which was unused. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* build: Drop unused variables from smartcard Makefile.amPhilip Withnall2017-02-141-37/+0
| | | | | | | | | | Since commit 6d01a434ca2faa88acb2aed1224d23cea329f1f8, libsmartcard.la is no more, so all the variables which defined how to compile it are redundant. This fixes an automake warning about unused variables. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Drop cc_rfkill_glib_send_event() due to being unusedPhilip Withnall2017-02-142-61/+0
| | | | | | No need to complicate the code with it. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Port from GSimpleAsyncResult to GTaskPhilip Withnall2017-02-141-51/+36
| | | | | | | | | | | This introduces no functional changes: it’s a like-for-like port from GSimpleAsyncResult (deprecated) to GTask (not deprecated). This bumps the GLib dependency to 2.44 due to the use of g_autoptr() to simplify memory management. GTask itself was introduced in 2.36, which we already depended on. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* build: Fix shadowing of libexec_PROGRAMS in power plugin Makefile.amPhilip Withnall2017-02-141-1/+1
| | | | | | | | This was causing the gsd-power plugin to not be built if HAVE_GUDEV was defined (and gsd-backlight-helper was being built). Fixes the corresponding automake warning. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* rfkill: Fix indentation in D-Bus introspection XMLPhilip Withnall2017-02-141-7/+7
| | | | | | This is a formatting fix only; no functional changes. https://bugzilla.gnome.org/show_bug.cgi?id=778383
* media-keys: Handle binding grabs when there's already one pendingRui Matos2017-02-141-5/+31
| | | | | | | | | Since grabbing is asynchronous, we might end up with requests to grab a binding combo while we already have a pending grab for that same combo. If this happens, the last request should win, so keep track of it to re-try when we get the reply for the pending grab. https://bugzilla.gnome.org/show_bug.cgi?id=758302
* media-keys: Avoid leaking grabbed bindingsRui Matos2017-02-141-4/+10
| | | | | | | If a binding definition changes again before we get the dbus reply for the previous change we'd never ungrab the previous accel id. https://bugzilla.gnome.org/show_bug.cgi?id=758302
* media-keys: Avoid using free'd memoryRui Matos2017-02-141-1/+2
| | | | | | | | If a MetaKey instance is removed from the array and free'd after we call grab_media_key() but before the dbus reply comes in, we end up writing over free'd memory (&key->accel_id). https://bugzilla.gnome.org/show_bug.cgi?id=758302
* media-keys: Reference count MediaKey struct instancesRui Matos2017-02-141-4/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=758302
* media-keys: Avoid multiple grab/ungrab pairs on custom binding changesRui Matos2017-02-141-2/+2
| | | | | | | | | | | | | | | | | | If there are gsettings changes to a custom binding's gsettings we could end up calling update_custom_binding() twice in a row: one for the 'binding' setting and one for the 'command' setting. This means that we would add the same binding twice and the second addition would fail resulting in key->accel_id being set to 0, preventing us from handling the binding when it gets activated. Since we're only interested in changes to the 'binding' setting, we can prevent this problem and the extra work we always do by ignoring changes to any other setting keys. Thanks to Matthijs Kooijman (matthijs@stdin.nl) for debugging and pointing out the problem. https://bugzilla.gnome.org/show_bug.cgi?id=758302