Commit Graph

47404 Commits

Author SHA1 Message Date
Emmanuele Bassi
3da73371b9 gdk: Add 'GDK_GL=gles' flag
Allows forcing the selection of a GLES context.
2016-04-25 12:29:36 +01:00
Emmanuele Bassi
55537cccbd gdk: Move GLSL shaders into GResource
Having the shaders inlined as C strings makes them harder to edit and
maintain.
2016-04-25 12:29:36 +01:00
Emmanuele Bassi
d7b5ea89eb gl: Relay use-es from context to paint data
This way we can select the appropriate API or the appropriate shaders.

https://bugzilla.gnome.org/show_bug.cgi?id=743746
2016-04-25 12:29:36 +01:00
Emmanuele Bassi
e1cecd243a gl: Add 'use-es' flag
On some platforms we can ask the GL context machinery to create a GLES
context, instead of a GL one.

In order to ask for a GLES context at GdkGLContext realization time, we
use a bit field like we do for forward compatible, or debug contexts.

The 'use-es' bit also changes the way we select a default version,
because OpenGL and OpenGLES versions differ.

https://bugzilla.gnome.org/show_bug.cgi?id=743746
2016-04-25 12:29:36 +01:00
Paolo Borelli
6225d435e6 inspector: do not leak seat capabilities descriprion
Factor out an utility function for readability and free the string
with the list of capabilities
2016-04-24 17:49:26 +02:00
Christian Hergert
0b88d7976c quartz: fix quartz build
The quartz backend has its own implementation of these that
collide since the gtkdragdest.c extraction.

https://bugzilla.gnome.org/show_bug.cgi?id=764712
2016-04-24 03:50:22 -07:00
Christian Hergert
4f63d83955 kineticscrolling: avoid stutter at tail of kinetic deceleration
When decelerating the kinetic scroll, we can get into a position where it
looks like we are stuttering. This happens because the amount we move is
so little that it takes multiple frames to make forward progress by one
pixel.

This prevents that by detecting when we have reached the slow stutter of
the deceleration and simply stops the deceleration phase immediately.

https://bugzilla.gnome.org/show_bug.cgi?id=765493
2016-04-24 03:49:20 -07:00
Lapo Calamandrei
aa99c64fdd Adwaita: color tweaks
use a slightly cold and slightly darker gray for the dark variant,
use the same hue for the osd bg color, make it bit darker and
transparent.
2016-04-22 14:44:59 +02:00
GNOME Translation Robot
61a454ffbe Updated Scottish Gaelic translation 2016-04-22 12:09:51 +00:00
Sébastien Wilmet
554de0be2a app: replace private accels functions by get_application_accels()
It's like gtk_application_get_action_muxer().

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:43:27 +02:00
Sébastien Wilmet
3b988ce523 app: share function to normalise detailed action name
Put the function in gtkactionmuxer.c, where
gtk_print_action_and_target() is implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:40:08 +02:00
Sébastien Wilmet
3d182160bb app-accels: rename static functions
Remove the "accels_" prefix from the remaining static functions. The
prefix no longer makes sense since the whole file is devoted to accels.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:39:44 +02:00
Sébastien Wilmet
bce4a0abde app: extract GtkApplicationAccels private class
This has several benefits:
- Less code in GtkApplication. The accels handling is something
  self-contained, and GtkApplication now delegates the work.
- For the accels functions, there is now a distinction between static
  functions and functions in the gtkapplicationaccelsprivate.h header,
  which makes the code easier to understand, because we have a good
  overview just by reading the header.
- The struct _GtkApplicationPrivate is now easier to find instead of
  being in the middle of the file.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:39:18 +02:00
Sébastien Wilmet
e0c34fd028 app: write higher-level gtk_application_accels static functions
These will become the functions present in the
gtkapplicationaccelsprivate.h header.

The gtk_application_accels functions deal with detailed_action_name's
instead of action_and_target's. action_and_target is an implementation
detail of Accels.

The added function prototype is temporary, it'll be removed in a later
commit.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:38:56 +02:00
Paolo Borelli
c574ef0954 textiter: add unit test for forward_to_line_end
Surprisingly we had no unit test for this method
2016-04-22 08:54:25 +02:00
Matthias Clasen
73c91c285e Fix formatting
The previous change was not quite using the right coding style.
2016-04-21 23:24:13 -04:00
Timm Bäder
0815b21ad4 listbox: Make sure page down/up move at least one row
When the current cursor_row is taller than the page_size we get from the
GtkAdjustment, the previous code would not actually cause any scrolling,
so make sure we just take the row after or before the cursor_row in that
case.

https://bugzilla.gnome.org/show_bug.cgi?id=765261
2016-04-21 23:11:38 -04:00
Matthias Clasen
7a7e3fc0e3 Ad d new API to the docs 2016-04-21 22:55:57 -04:00
Frediano Ziglio
cf14fea5a8 Save scancode inside GdkEventPrivate
Windows save in hardware_keycode an information which is not so low
level and some application require the hardware scancode.
As Windows provides this information save it in GdkEventPrivate
and provide a function to get this information.
For no Windows system the function return the hardware_keycode instead.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=765259
2016-04-21 22:35:47 -04:00
Benjamin Otte
c081ca2d4c cssshadowsvalue: Avoid allocating new value if not needed 2016-04-21 23:01:31 +02:00
Benjamin Otte
f93eca5604 cssbordervalue: Avoid allocating new value if not needed 2016-04-21 23:01:31 +02:00
Benjamin Otte
2fc0d6a91a cssbgsizevalue: Avoid allocating new value if not needed 2016-04-21 23:01:31 +02:00
Matthias Clasen
6d953cb08e Add a dnd test using a window as icon
This case is causing problems in firefox. Lets at least make
sure that it doesn't crash in GTK+.
2016-04-21 14:23:00 -04:00
Lapo Calamandrei
3ed8ac034d Adwaita: backdrop active button color tweaks 2016-04-21 17:01:45 +02:00
Lapo Calamandrei
d857ba3faf Adwaita: cosmetics 2016-04-21 16:51:24 +02:00
Lapo Calamandrei
874d4ede67 Adwaita: solid bg for disabled pushed button 2016-04-21 16:43:35 +02:00
Lapo Calamandrei
517f33b1a6 Adwaita: spinbutton fixes
reset background-color on backdrop disable buttons and entry node.
2016-04-21 16:25:05 +02:00
Jonathan Matthew
22cd8e9d4f gtkmenusectionbox: remove submenus when the parent item is removed
https://bugzilla.gnome.org/show_bug.cgi?id=749405
2016-04-20 17:28:19 -04:00
Matthias Clasen
d6ac55102e widget: Don't show widget resizes in the inspector
Avoiding this sort of visual debugging in the inspector
is the main reason we have per-display debug flags now.
2016-04-19 23:32:26 -04:00
Matthias Clasen
d58885c9b9 css gadget: Fix baseline debug
We were not using the baseline that we're computing.
2016-04-19 23:26:57 -04:00
Matthias Clasen
37b70a9733 Use qdata for debug flags
This avoids some overhead.
2016-04-19 23:26:57 -04:00
Matthias Clasen
c01befe5cc css gadget: Don't get display flags twice
This got more expensive now that we store them per-display,
so don't get them twice in the same function.
2016-04-19 23:26:57 -04:00
Christian Hergert
3df2e0b26a debug: remove open-coded debug checks in gtktextsegment
These runtime checks were being performed whether or not we were in a
debug build. Using GTK_DEBUG_CHECK() will compile out of production
builds, as it will result in something like:

  if (G_UNLIKELY(0))

which the optimizer can prune.

https://bugzilla.gnome.org/show_bug.cgi?id=765284
2016-04-19 19:56:17 -07:00
Matthias Clasen
f3e6d930a8 text tag: Add a va marshaller to ::event 2016-04-19 21:10:31 -04:00
Matthias Clasen
c7bac91494 text buffer: Add va marshallers for signals 2016-04-19 21:10:31 -04:00
Matthias Clasen
3c3aa478f9 menushell: Add a va marshaller for ::insert 2016-04-19 21:10:31 -04:00
Lapo Calamandrei
1b22039649 Adwaita: use an image for backdrop button background
which doesn't make the sliders flash during background transition.
2016-04-19 23:00:54 +02:00
Lapo Calamandrei
5fc18c7167 Adwaita: link button style fix
ensure the label color doesn't get overridden, fixes link button
label being gray in backdrop.
2016-04-19 22:58:33 +02:00
Lapo Calamandrei
c16c9e7c3f Adwaita: scale with marks style fix
reset background-color on the slider.
2016-04-19 22:58:33 +02:00
Lapo Calamandrei
5199b66682 Adwaita: fix switch styling
ensure the last button has rounded corners and adapt to button
mixin changes.
2016-04-19 22:58:33 +02:00
Lapo Calamandrei
24c3906d5f Adwaita: fix insensitive switch styling
misplaced backdrop disabled selector was overriding the disabled
one.
2016-04-19 22:58:33 +02:00
Matthias Clasen
51d58108f9 Add some va marshallers to frequent signals
This makes us take the fast path in signal emission.
2016-04-19 16:12:33 -04:00
Lapo Calamandrei
b596fcada7 Adwaita: stop using images for solid backgrounds...
...unless it's needed.
2016-04-19 21:59:37 +02:00
Matthias Clasen
5efb574055 magnifier: Only connect to ::draw when needed
This making us take the slow path in ::draw handling, so we
want to avoid it if we can.

https://bugzilla.gnome.org/show_bug.cgi?id=765238
2016-04-19 15:29:04 -04:00
Lapo Calamandrei
7397fe0eab Adwaita: add shadows back...
...correctly inizializing a sass var.
2016-04-19 21:25:27 +02:00
Rui Matos
deaf664ed2 wayland: Leave existing mods on map_virtual_modifiers
map_virtual_modifiers() is supposed to add the necessary virtual mods
but otherwise leave the mods that are passed in.

https://bugzilla.gnome.org/show_bug.cgi?id=765270
2016-04-19 21:14:20 +02:00
Matthias Clasen
b8a86e6ca4 wayland: Some more debug spew
Print the modifiers and their mapping out as well. This
information is contained in the keymap, but this is a bit
easier to digest.
2016-04-19 12:43:03 -04:00
Matthias Clasen
e7d84898ee wayland: Add debug output for keymaps
Use GDK_DEBUG=input to see your keymap sent over and over again.
Efficiency!
2016-04-19 12:23:51 -04:00
Timm Bäder
36fead28e0 gtkcssimagebuiltin: Save/restore around cairo_clip
This was previously causing trouble in checkbuttons where the check node
didn't have an icon shadow set, e.g. in Raleigh.
2016-04-19 15:31:26 +02:00
Matthias Clasen
d1b07bc386 Add a comment to explain numbers here
This explains the change in the previous commit.
2016-04-19 07:34:44 -04:00