Commit Graph

40982 Commits

Author SHA1 Message Date
Matthias Clasen
69a0b31d2d Trivial: sort file list alphabetically 2014-10-31 14:16:02 -04:00
Lapo Calamandrei
00f618ea1a Adwaita: special case .default-decoration
Titlebars which are just window handles can be smaller.
2014-10-31 16:53:23 +01:00
Lapo Calamandrei
5a5e74bbe2 Adwaita: simpler gtkcalendar style (once again) 2014-10-31 16:44:21 +01:00
Matthias Clasen
89e12495b6 inspector: Improve search in style property list
Use a search bar with a search entry instead of the builtin
treeview search popup.
2014-10-30 20:54:54 -04:00
Matthias Clasen
574c774e4e inspector: Improve search in property list
Use a search bar with a search entry instead of the builtin
treeview search popup.
2014-10-30 20:54:04 -04:00
Matthias Clasen
42e1fad138 inspector: Stop overeager activation
Stop using activate-on-single click for the property list -
it is a little annoying to have the popover come up when you
just click in the list to get the focus there.
2014-10-30 18:47:46 -04:00
Alexander Larsson
f66060c422 GdkGLArea: fix has_alpha changes at runtime
We need to completely reallocate the buffers if we switch
has_alpha, because we may switch from render buffers to
texture.
2014-10-30 21:04:29 +01:00
Alexander Larsson
37d0159a84 GtkGLArea: Add resize signal
This is very useful, as almost all GL code wants to recalculate
the cameras each time the window size changes.
2014-10-30 21:04:29 +01:00
Alexander Larsson
969b9c6552 GtkGLArea: Add profile property
This lets you force a core 3.2 context if you want
2014-10-30 21:04:29 +01:00
Alexander Larsson
b519b642bd GtkGLArea: Add INPUT_ONLY window so that we can get events 2014-10-30 21:04:29 +01:00
Alexander Larsson
5ea3a1028d GtkGLArea: Major reworking
This restructures the way buffers are allocated and bound in a way
that is more flexible.

Buffer operation happens in three phases:
create_buffer() - Creates the gl objects
allocate_buffers() - Allocates space for the buffers at a given size
attach_buffers() - Attaches the buffers to the framebuffer and makes
                   the framebuffer the default drawing target
And destroy via
delete_buffers()

We call all these the first draw, and after that we allocate buffers
each time the widget changes size until the buffers are deleted.
We delete the buffers at unrealize.

However, anyone that wants to manually control buffer allocation strategies
can manually call allocate/delete_buffers().

There are also some other changes:
* Support for stencil buffers.
* A manual render mode where ::draw doesn't render unless you manually
  invalidated the previous rendering.
2014-10-30 21:04:29 +01:00
Alexander Larsson
869f300f0a gdk_x11_display_make_gl_context_current: move some code
This moves the code related to the frame sync code into
the is_attached check, which means we don't have to ever
run this when making non-window-paint contexts current.

This is a minior speed thing, but the main advantage
is that it makes making a non-paint context current
threadsafe.
2014-10-30 21:04:29 +01:00
Lapo Calamandrei
7a73ec1bb2 Adwaita: darken a bit OSD background color
To not make it vanish on dark variant background color.
2014-10-30 18:42:31 +01:00
Matthias Clasen
bb41cfe9d9 Improve warning
Mention the file that we're failing to load. That makes it obvious
what is wrong.
2014-10-30 13:41:13 -04:00
Matthias Clasen
cacda8086e inspector: Add HighContrast to built-in themes list 2014-10-30 12:52:25 -04:00
Matthias Clasen
d8ba193e9a HighContrast: integrate in build machinery 2014-10-30 12:52:25 -04:00
Matthias Clasen
fce2565673 Drop gtk.gresource.xml
Theme resources are controlled from the (generated) .gresource.xml
file two stories up.
2014-10-30 12:52:25 -04:00
Matthias Clasen
76b3fee093 HighContrast: Add sass parsing script
Just a copy of what we have next door in Adwaita.
2014-10-30 12:52:25 -04:00
Matthias Clasen
16d79e8883 HighContrast: Drop settings.ini
The only setting in there is already the default behavior,
and the setting is deprecated and ignored anyway.
2014-10-30 12:52:25 -04:00
Lapo Calamandrei
efaabdad0a Adwaita: slightly contrasting popover background 2014-10-30 17:51:22 +01:00
Lapo Calamandrei
fdbb93d78c Adwaita: border radiusses rationalization 2014-10-30 17:51:22 +01:00
Piotr Drąg
75d37acb25 Updated POTFILES.in 2014-10-30 17:21:40 +01:00
Jakub Steiner
495f764b3d theme: move HC theme from gnome-themes-standard
- HC is part of the toolkit the same way as Adwaita is
- No automake foo included
2014-10-30 16:14:37 +01:00
Alexander Larsson
0eb2fb01fd Add GdkGLContext::profile 2014-10-30 12:43:03 +01:00
Alexander Larsson
398697eb2f Clarify docs for gdk_cairo_draw_from_gl 2014-10-30 12:43:03 +01:00
Alexander Larsson
f0ae8da993 Remove GdkGLContext::visual
This is not really needed. The gl context is totally tied to the
window it is created from by virtue of sharing the context with the
paint context of that window and that context always has the visual
of the window (which we already can get).

Also, all user visible contexts are essentially offscreen contexts, so
a visual doesn't make sense for them. They only use FBOs which have
whatever format that the users sets up.
2014-10-30 12:43:03 +01:00
Alexander Larsson
ad30262fef GtkGLArea: Always destroy context on unrealize
We had some code that tried to reuse the context over realize, but
that doesn't work as we need to share with the possibly new
paint context of the re-realized window.
2014-10-30 12:43:03 +01:00
Alexander Larsson
5f14630b76 GdkWindow: destroy paint gl context on destroy 2014-10-30 12:43:03 +01:00
Alexander Larsson
dbbab0791d GdkGLContext: Track shared context
This allows us to read it back, but primarily it ensures
the shared context wrapper stays alive as long as the context.
2014-10-30 12:43:03 +01:00
Alexander Larsson
fb50015519 GdkGLContext: Change the way we track the current context
To properly support multithreaded use we use a global GPrivate
to track the current context. Since we also don't need to track
the current context on the display we move gdk_display_destroy_gl_context
to GdkGLContext::discard.
2014-10-30 12:43:03 +01:00
Lapo Calamandrei
eb8f60f141 Adwaita: osd rationalization and tweakings
Removed bright translucent outer border for "top level" osd widgets,
insensitive osd entry styled, more meaningfull color variables and
some code rationalization.
2014-10-30 11:50:27 +01:00
Alexander Larsson
afd9709aff GdkWindowX11: Keep the impl window cairo surface around until destroy
We used to have a weak ref to the cairo surface and it was keep
alive by the references in the normal windows, but that reference
was removed by d48adf9cee, causing
us to constantly create and destroy the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=738648
2014-10-30 10:32:47 +01:00
Matthias Clasen
47191ce173 Make the inspector window translucent instead of lowering
Make the inspector window click-through and see-through
when we can, instead of lowering it. This is useful, since
Wayland has no lowering.
2014-10-29 23:29:20 -04:00
Lapo Calamandrei
7a1eabaf62 Adwaita: fix for the previous colorswatch fix...
Make the selected colorswatch inhert on backdrop.
2014-10-29 19:55:32 +01:00
Lapo Calamandrei
43a2676c3f Adwaita: fix selected colorswatch white border 2014-10-29 19:50:58 +01:00
Lapo Calamandrei
bfd4933aa3 Adwaita: first round of OSD style converage
Some code refactoring, entry and spinbuttons and flat buttons
styled, more to come...
2014-10-29 18:40:28 +01:00
Carlos Garnacho
b0313c7bcf wayland: Emit GDK_OWNER_CHANGE events around wl_data_offer changes
This way the upper GtkClipboard code emits correctly ::owner-change when
receiving these events.
2014-10-29 18:33:48 +01:00
Alexander Larsson
c7451bbf3b GdkX11GLContext: Fix leak 2014-10-29 13:52:04 +01:00
Alexander Larsson
8c7623de84 Cache default gdk visuals in the GDK_VISUALS property on the root window
This means we don't have to try to initialize opengl in every gtk
instance that is stated. It will only happen for the first one.

https://bugzilla.gnome.org/show_bug.cgi?id=738670
2014-10-29 13:35:17 +01:00
Alexander Larsson
dae447728d X11: Pick better system and rgba visuals for GL
We want to create windows with the default visuals such that we then
have the right visual for GLX when we want to create the paint GL
context for the window.

For instance, (in bug 738670) the default rgba visual we picked for the
NVidia driver had an alpha size of 0 which gave us a BadMatch when later
trying to initialize a gl context on it with a alpha FBConfig.

Instead of just picking what the Xserver likes for the default, and just
picking the first rgba visual we now actually call into GLX to pick
an appropriate visual.
2014-10-29 13:35:17 +01:00
Matthias Clasen
8765970ba1 Remove a redundant call
No need to set shapes twice in a row.
2014-10-29 06:49:59 -04:00
Matthias Clasen
0b4c37624a GtkPopoverMenu: Add API to open a submenu
This allows alternative menu switching to be implemented, besides
the builtin GtkModelButton support.
2014-10-29 06:49:59 -04:00
Matthias Clasen
f83c903ed8 Add a scale to the popover menu example
Demonsttrate that this is flexible enough for the intended uses.
2014-10-29 06:49:59 -04:00
Matthias Clasen
6e001acbf9 Add documentation
Document GtkModelButton and GtkPopoverMenu.
2014-10-29 06:49:59 -04:00
Matthias Clasen
228e51b319 Adapt the testpopover example
Add the required boxes for each submenu. We now need to specify the
submenu name only once per submenu.
2014-10-29 06:49:59 -04:00
Matthias Clasen
55b7838b4f GtkPopoverMenu: Simplify
Change things so each submenu is a single child, and users are
required to create the box themselves.
2014-10-29 06:49:59 -04:00
Matthias Clasen
2b5a49c285 Adapt the testpopover example
Drop all all explicit role setting from the testpopover example.
2014-10-29 06:49:59 -04:00
Matthias Clasen
689363a782 GtkModelButton: Don't require an explicit role
When we have an action-name, we can deduce the role from the
action that is looked up by the action helper.
2014-10-29 06:49:59 -04:00
Matthias Clasen
2401a6cb8e Adapt the testpopover example 2014-10-29 06:49:59 -04:00
Matthias Clasen
14e394d3d7 GtkModelButton: Rename action-role to role
Rename action-role to role, and make all properties readable.
2014-10-29 06:49:59 -04:00