Commit Graph

40657 Commits

Author SHA1 Message Date
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
Marek Černocký
1376c6b1b7 Updated Czech translation 2014-10-26 00:35:56 +02:00
Marek Černocký
eec161ab3f Updated Czech translation 2014-10-26 00:35:50 +02:00
Matthias Clasen
041ccd7f87 GtkPlacesSidebar: Don't crash on dnd
gtk_get_current_event() can return NULL. Don't crash if it does.

https://bugzilla.gnome.org/show_bug.cgi?id=739150
2014-10-25 16:00:00 -04:00
Matthias Clasen
e35d91d18f Revert "Inspector backend hack"
This reverts commit f88a5dc8c7.

Didn't mean to push this.
2014-10-25 13:58:36 -04:00
Matthias Clasen
9ca9fccace GtkSpinButton: Set the screen on the panel contexts
Failure to do so results in custom styling leaking through in
the inspector. This is pretty obvious, now that the inspector
is using a separate display connection and is generally isolated
from style changes.
2014-10-25 13:31:57 -04:00
Matthias Clasen
f88a5dc8c7 Inspector backend hack 2014-10-25 10:33:22 -04:00
Matthias Clasen
f733fa88f5 Broadway: Remove display assumptions
In various places, the broadway backend was just using
the default display and assumed that it is the broadway
display. That may not be the case in a multi-backend world,
so instead iterate over all displays and use the first
broadway display - still not perfect, but enough to survive
for now.
2014-10-25 10:32:53 -04:00
Matthias Clasen
23641e3103 inspector: Plug a memory leak 2014-10-25 10:00:57 -04:00
Matthias Clasen
bd031b89c1 inspector: Add style classes to the object list
We have a lot of space here now, so show some
useful information.
2014-10-25 10:00:39 -04:00
Matthias Clasen
182dd3c1ea Fix a mixup in popover realization
When the window is on a non-default screen, popover_realize
ended up passing a visual and a parent_window from different
screens into gdk_window_new, which doesn't work. Fix it by
using the visual of the parent window.
2014-10-24 23:36:35 -04:00
Matthias Clasen
a46d4e51f7 inspector: Improve details buttons
Ensure that the details buttons are only sensitive when
we actually have details to show.
2014-10-24 21:52:23 -04:00
Matthias Clasen
70c3241bd3 inspector: Improve tab switching
Switch the object and resource trees away from activate-on-single-click
and add a 'view details' button.
2014-10-24 21:14:16 -04:00
Matthias Clasen
32326f826f X11: Don't assume all displays are X11 displays
When iterating over the list of displays gotten from the
display manager, we have to check if what we got is actually
an X11 display.
2014-10-24 19:05:09 -04:00
Matthias Clasen
4590501854 Properly update the style cascade on screen change
GtkStyleContext was not properly handling the style cascade when
setting a screen, causing the inspector global CSS to affect the
inspector window, even though the inspector is using a different
screen now.
2014-10-24 16:23:07 -04:00
Matthias Clasen
385e6beafe Fix the build
Some forgotten include path adjustments.
2014-10-24 16:12:33 -04:00
Matthias Clasen
c16fa45bfe inspector: Use a separate display connection
This helps isolate the inspector from some of the changes that
it can trigger. To specify a different display, set
GTK_INSPECTOR_DISPLAY to the name of the display to use for
the inspector window. If no display is specified, GTK+ will
use a separate connection to the default display.
2014-10-24 15:57:33 -04:00