Freedesktop (XDG) portals are a collection of D-Bus APIs that work
across desktop environments, display servers and work within
containerized applications, like Flatpak. The internal implementation
can then choose to implement these in such a way that takes into account
security considerations, as well as making sure the user consents to
certain actions.
One such portal is the `Screenshot` portal, which contains a
`Screenshot()` method as well as `PickColor()`. We already use the
former for taking a screenshot, and this commit makes sure our color
picker also makes use of the latter.
By doing this, color picking is now possible on the major Wayland
compositors.
(Honestly, we should remove DE-specific backends like that of KWin, to
have less variation on the possible results of a color picking
operation).
Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/1074
* Don't generate our own marshallers if they are available in GLib
already
* Don't set the c_marshaller parameter in `g_signal_new()` if it's a
default marshaller provided by GLib. See commit message of commit
39e4aa3c57 on why this is the case.
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
Though forward declarations of the implementations are ok, it is cleaner
to have proper header files for each variant (default, kwin, quartz
right now). Of course these new header files are not installed and must
be kept private for build only.
Add support for KWin API, for KDE on Wayland.
Unfortunately though, KWin's "pick" API seems to have failures, so I
fallback to the default color picking when this happens. This will still
not work on Wayland, but at least won't cause regression for color
picking on KDE/X11.
See also KDE bug: https://bugs.kde.org/show_bug.cgi?id=387720
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html
Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
The common code relies on X11 pointer grabbing semantics, which does
not work well on OS X. An attempt using event taps also proved
problematic, in particular with regard to setting the mouse cursor.
This patch implements a fully separate code for use on OS X platforms.
It works by simply overlaying the desktop with big transparent windows
on which the mouse cursor is set and motion events are captured. Evil,
but it works.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2005-12-20 Michael Natterer <mitch@gimp.org>
* libgimp/*.c
* libgimpconfig/*.c
* libgimpmodule/*.c
* libgimpthumb/*.c
* libgimpwidgets/*.c: port to G_DEFINE_TYPE() and friends. Some
related cleanup.
2004-07-07 Sven Neumann <sven@gimp.org>
* app/tools/gimpeditselectiontool.c
(gimp_edit_selection_tool_key_press): adapt the arrow key velocity
to the display scale factor. Please test and complain if you
dislike this behaviour.
* themes/Default/images/Makefile.am
* themes/Default/images/stock-color-pick-from-screen-16.png: new
icon drawn by Jimmac.
* libgimpwidgets/gimpstock.[ch]: register the new icon.
* libgimpwidgets/gimppickbutton.c: use it for the screen color
picker instead of reusing the color picker tool icon.
2004-05-27 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppickbutton.c: applied patch from Philip
Lafleur that fixes color picking for XInput devices (bug #143166).
2003-01-05 Manish Singh <yosh@gimp.org>
* many files in app, modules and libgimp*: cleanup, removed unecessary
G_OBJECT() casts. Should do the same for plug-ins, when more of them
get undeprecated.
2002-11-04 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimppickbutton.[ch]: new GtkButton subclass
implementing the pick-from-everywhere eyedropper known from
GtkColorSel. Code shamelessly stolen from there.
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgets.h
* libgimpwidgets/gimpwidgetstypes.h: changed accordingly.