Commit Graph

40773 Commits

Author SHA1 Message Date
Matthias Clasen
c9ad936011 Drop an unused variable 2014-10-29 06:49:58 -04:00
Alexander Larsson
d5cd05a0f4 GdkGLContextX11: Don't free NULL visual info 2014-10-29 11:26:00 +01:00
Matthias Clasen
778865f316 Fix toplevel input shape for csd windows
We need to maintain the application-set and the the csd
input shape separately, and intersect them to pass them
down.
2014-10-28 20:23:47 -04:00
Matthias Clasen
3f1dc87188 Plug another memory leak
Also found by valgrind.
2014-10-28 16:07:57 -04:00
Matthias Clasen
c8d4eefa71 Plug some memory leaks in GL support
valgrind pointed these out.
2014-10-28 16:07:57 -04:00
Alexander Larsson
0814cd9f8b GdkGlContextWayland: Don't require specific bit depths
This just means we may fail to get a gl context, we just require
*some* color depth.
2014-10-28 18:30:09 +01:00
Alexander Larsson
3406bbd128 Pick the first rgba visual, not the last
The visuals are typically sorted by some sort of "most useful first"
order. And picking the last one is likely to give us the weirdest
matching glx visual.
2014-10-28 18:30:09 +01:00
Alexander Larsson
8d6d6dcca3 GdkGLContextX11: Ensure we get the fbconfig with the exact same visual
We really want a gl context with exactly the same visual, or we will
get a badmatch later, which hits us on nvidia as per:

https://bugzilla.gnome.org/show_bug.cgi?id=738670
2014-10-28 18:30:09 +01:00
Matthias Clasen
b673490a1b Document Wayland opacity handling 2014-10-28 10:48:49 -04:00
Matthias Clasen
4cf6edda55 wayland: Make window opacity work
Under wayland, the compositor doesn't have a 'overall window alpha'
knob, we just need to add the alpha to the buffers we send.
Client-side alpha, if you want to call it that.

Implement this by reusing the existing alpha support for non-toplevel
widgets. As a side-effect of the implementation, windows with RGBA
visual under X will now also use per-pixel alpha, instead of
overall alpha.
2014-10-28 10:28:23 -04:00
Matthias Clasen
d58c750db5 Bump atk dep
Needed for ATK_STATE_HAS_TOOLTIP.
2014-10-28 08:08:49 -04:00
Matthias Clasen
850143b7a0 Inspector: Make picking work without a grab
Turns out Weston takes an X grab while delivering button events.
Thus, trying to take a grab in response to a button press is
futile.
2014-10-28 07:05:45 -04:00
Jasper St. Pierre
c40ba85ace wayland: Don't use the default display
Pass a display in so that multi-display technology works.
2014-10-27 22:29:41 -07:00
Jasper St. Pierre
bbe9ef20da gdkevents: Use the correct display to copy event data 2014-10-27 22:29:41 -07:00
Jasper St. Pierre
887b7356c3 gdkdisplay: Provide a default event_data_copy / event_data_free
Every single implementation but Quartz is a no-op for this, so just
provide it once rather than in every backend.
2014-10-27 22:13:23 -07:00
Matthias Clasen
e36b57e7f9 gtk-demo: Drop uses of gdk_cursor_new()
Use gdk_cursor_new_for_display() instead.
2014-10-28 00:56:46 -04:00
Matthias Clasen
abe7187cfb Add another multi-device invariant
The device and window passed to gdk_device_grab() must be
on the same display, or things are unlikely to work.
Document and assert this.
2014-10-28 00:54:39 -04:00
Matthias Clasen
86f66d26fe Drop an unused variable 2014-10-28 00:53:59 -04:00
Matthias Clasen
4c69dabb6e Don't return GDK_GRAB_SUCCESS on failure
That seems ... counterproductive.
2014-10-28 00:51:32 -04:00
Matthias Clasen
d1dcac85f3 Mention the 'same display' requirement in the docs too 2014-10-28 00:44:33 -04:00
Matthias Clasen
eedff39413 Deprecate gdk_cursor_new()
Too easy to introduce an unintended assumption about the display
being the default this way.
2014-10-28 00:38:59 -04:00
Matthias Clasen
8aecf2c06a GtkAboutDialog: Don't use gdk_cursor_new
gdk_cursor_new returns cursors for the default display, and
thus is not safe to use in code that may run on non-default
displays.
2014-10-28 00:36:17 -04:00
Jasper St. Pierre
5f980cd8de gtkwindow: Use gdk_cursor_new_for_display
Otherwise, this crashes the inspector, since it now uses multi-display
technology, and on Wayland, resources like the cursor are client-private.
2014-10-27 21:22:44 -07:00
Jasper St. Pierre
52e3b88382 gdkwindow: Specify some invariants for cursors
Cursors should not be on a different display than their window /
device, as that would break Wayland.
2014-10-27 21:22:31 -07:00
Matthias Clasen
168a49426e Update for 3.15.1 2014-10-27 20:03:51 -04:00
Matthias Clasen
60a11333af Update expected results of a11y tests
The new has-tooltip state is showing up in a number of places,
as expected.
2014-10-27 20:03:51 -04:00
Jasper St. Pierre
0f79cb3d11 x11: Scale the frame extents as well 2014-10-27 16:54:33 -07:00
Matthias Clasen
a680631345 gtk3-demo: Add a frame to the sidebar
With overlay scrollbars, there's no visible separation between
the sidebar and the content otherwise.
2014-10-27 17:15:31 -04:00
Alexander Larsson
f7b1ba0943 opengl: Use GL_TEXTURE_2D rather than GL_TEXTURE_RECTANGLE_ARB when possible
This is more standard, and most driver support non-power-of-2 TEXTURE_2D
these days. We fall back for ancient drivers.
2014-10-27 21:17:08 +01:00
Alexander Larsson
08d44648ea opengl: Use proper blend function for premultiplied alpha 2014-10-27 21:17:08 +01:00
Alexander Larsson
72a6459d73 gdkglcontext: Track whether to use GL_TEXTURE_2D or GL_TEXTURE_RECTANGL_ARB 2014-10-27 21:17:08 +01:00
Jasper St. Pierre
5f40f58c36 cairoblur: Fix the blur again once more
The differences between the mutter and GTK+ code are subtle, but it
turns out that _gtk_cairo_blur_compute_pixels actually returns the
shadow *spread*. Since we use a triple box blur, the constant was
multiplied by 1.5 to approximate three chained box blurs. Split this
out and use the correct value for the lobe width.
2014-10-27 10:20:43 -07:00
Jasper St. Pierre
ac9ac55555 cairoblur: Fix the blur code
We weren't passing in the right "d" value, which was causing the blur to
behave incorrectly, especially in the case of 1px blurs, which would
cause no blurs at all.

The blur should now match the web.
2014-10-27 10:10:32 -07:00
Alexander Larsson
3013997e23 Rename gdk_gl_context_flush_buffer to gdk_gl_context_end_frame
This makes a lot more sense.
2014-10-27 16:33:37 +01:00
Matthias Clasen
f1fe70e4ad Indentation fix 2014-10-27 07:19:50 -04:00
Sebastien Lafargue
17f9eed14e popover menus: Take iconic into account
We don't want separators in both side of an iconic section
and use a 10px margin to separate two iconic sections.

Separators are also updated in case of dynamic insertion
( often used with menu items for plugins )

https://bugzilla.gnome.org/show_bug.cgi?id=738650
2014-10-27 07:08:37 -04:00
Matthias Clasen
fc6f22c3ce Ignore gdk-pixbuf deprecations 2014-10-27 07:05:22 -04:00
Cosimo Cecchi
96a3b23736 testlevelbar: fix CSS to be aligned with documentation
https://bugzilla.gnome.org/show_bug.cgi?id=707695
2014-10-27 06:56:19 -04:00
Cosimo Cecchi
631e2f4c9b levelbar: don't use the current value style class for empty blocks
We want to be able to style the empty blocks independently of all the
offset styles, so remove the current style class when painting an empty
block.

https://bugzilla.gnome.org/show_bug.cgi?id=707695
2014-10-27 06:56:19 -04:00
Cosimo Cecchi
0555ef20a4 testlevelbar: don't segfault when quitting testlevelbar
Quit the mainloop when the window is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=707695
2014-10-27 06:56:19 -04:00
Matthias Clasen
3a2bf9d878 quartz: Move the FullscreenSavedGeometry definition earlier
Move the FullscreenSavedGeometry before the first (conditional)
use, to fix the build on OS X 10.6.

https://bugzilla.gnome.org/show_bug.cgi?id=737561
2014-10-27 06:49:46 -04:00
Marcus Karlsson
a703437796 quartz: fix build on 10.6 and below
It is not possible to successfully build GTK+ on OS X 10.6 and below
since NSFullScreenWindowMask is only available starting with 10.7. Add
ifdef guards around setStyleMask: in order to allow it to build on
earlier OS X releases.

https://bugzilla.gnome.org/show_bug.cgi?id=737561
2014-10-27 06:46:12 -04:00
Christophe Fergeau
506d59f526 Return correct font from gtk_font_chooser_widget_find_font
Commit 30a1c4ab fixed several memleaks including one in
gtk_font_chooser_widget_find_font.

However, the fix causes one extra call to gtk_tree_model_iter_next()
after finding the font we look for (ie pango_font_description_equal
returns TRUE): the 'increment' part of the for loop
(gtk_tree_model_iter_next) is run before the 'exit condition' of the for
loop is evaluated.

This commit reverts this part of commit 30a1c4ab and adds an extra
call to pango_font_description_free in order to fix the leak.

https://bugzilla.gnome.org/show_bug.cgi?id=739111
2014-10-26 21:53:33 -04:00
Christophe Fergeau
77487fef2f fontchooserwidget: Don't invalidate priv->font_iter in load_fonts
When using GtkFontChooserButton, the same GtkFontChooserWidget can be
hidden and shown multiple times. When doing that, the font that was
chosen the previous time should be the selected one in the
GtkFontChooserWidget, however this does not work as expected and a
somehow 'random' font gets selected (or none) instead.

Every time the font chooser widget is shown, its style will be updated,
causing gtk_font_chooser_widget_style_updated and then
gtk_font_chooser_widget_load_fonts to be called.

gtk_font_chooser_widget_load_fonts starts by clearing the GtkListStore
listing the available fonts, repopulates it, and then makes sure the
current font is selected.

However, this does not work as expected, as during the call to
gtk_list_store_clear, the cursor_changed_cb will be invoked multiple
times when the GtkTreeView cursor gets moved when the line where the
cursor currently is gets removed. This will cause the 'current font'
state (priv->font_desc) to be unexpectedly modified, and when
gtk_font_chooser_widget_load_fonts tries to reposition the cursor to the
'current font', we won't get the expect result.

This commit avoids that by making sure cursor_changed_cb does not get
called when we call gtk_list_store_clear in
gtk_font_chooser_widget_load_fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=739111
2014-10-26 21:53:33 -04:00
Matthias Clasen
e75310a445 Fix an out-of-bounds access in MyEnhancedXkbTranslateKeyCode
Commits 314b6abbe8 and eb9223c008 were ignoring
the fact that the code where found is set to 1 was modifying
col - which was an ok thing to do when that part of the code
was still breaking out of the loop, but it is no longer doing
that (since 2003 !). Fix things up by storing the final col
value in a separate variable and using that after the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=738886
2014-10-26 21:48:59 -04:00
Matthias Clasen
f7813deb26 Test h/vhomogenenous in teststack
Add separate checkboxes for hhomogeneous and vhomogeneous.
2014-10-26 15:07:26 -04:00
Matthias Clasen
e41a8cf6fc Use GtkStack:vhomogeneous for popover menus
This allows us to get rid of a size group.
2014-10-26 15:03:58 -04:00
Matthias Clasen
b86356bc1c GtkStack: split homogeneous
Split homogeneous into separate hhomogeneous and vhomogeneous
properties. vhomogeneous is what we want for popover menus.
2014-10-26 14:59:21 -04:00
Timm Bäder
4d075cf202 popover: Use the right area for drawing the background
The border shouldn't be subtracted.
2014-10-26 15:21:06 +01:00
Matthias Clasen
8b6457732f GtkBox: Fix self-assignment for center widget
This is happening when glade is loading ui files containing
center widgets.
2014-10-25 20:30:08 -04:00