Compare commits

...

201 Commits

Author SHA1 Message Date
Jasper St. Pierre 97d158b7d0 gdkwindow: Remove support for VISIBILITY_NOTIFY events on child windows
The code here is particularly complicated, and we already expect that
VISIBILITY_NOTIFY doesn't work properly under composited environments
anyway.

We don't remove the X11 codepath for handling VisbilityNotify, even if
we probably should.

Let's see if any apps complain. I seriously hope not.
2014-06-24 11:32:19 -04:00
Jasper St. Pierre 1d762cabb0 gtk: Don't set GDK_EXPOSURE_MASK on any of our widgets anymore
GTK+ actually hasn't processed GDK_EXPOSE events for child windows
for a considerable amount of time now, and GDK force-sends them for
any native window. Setting GDK_EXPOSURE_MASK forces GDK to send a
bunch of events that GTK+ won't ever parse, and causes GDK to do
some extra work.

Don't set the event mask on these widgets anymore.
2014-06-24 11:32:18 -04:00
Jasper St. Pierre d29922ad73 gdkwindow: Fizzle out early if we don't have to do anything 2014-06-24 11:32:18 -04:00
Lapo Calamandrei 739dacf12a Adwaita: set the correct indicator color for reorderable hover tabs 2014-06-24 14:04:26 +02:00
Lapo Calamandrei 7903c1d2a4 Adwaita: only side borders for reorderable tabs 2014-06-24 13:42:13 +02:00
Adam Dingle 67c3044f81 Require GLib 2.41.1 (for G_PARAM_EXPLICIT_NOTIFY) 2014-06-24 06:48:47 -04:00
Lapo Calamandrei abe36dc9cd Adwaita: added active state to the switch slider 2014-06-24 10:38:03 +02:00
Lapo Calamandrei 3cb2bf8b8a Adwaita: comment out button separators removal
...after reading #gnome-design scrollbark, since a consensus on how to achieve
this has not been reached yet.
2014-06-24 10:28:19 +02:00
Lapo Calamandrei 793a3eab82 Adwaita: fix view check/radio selected state. 2014-06-24 10:25:49 +02:00
Lapo Calamandrei 58b2d2cd0c Adwaita: disable separators in buttons 2014-06-24 09:28:29 +02:00
Colomban Wendling de071768ae gdkwindow: Don't leak the surface in gdk_cairo_create() 2014-06-23 21:52:57 -04:00
Matthias Clasen 7119037743 Add a test for async icon loading 2014-06-23 21:25:21 -04:00
Jasper St. Pierre e76f41b788 gtkmain: Rearrange code
Prevent a segfault in unknown circumstances, and break the ignore
deprecations wrapper out from the if statement so that we don't
cover too much ground by accident.
2014-06-23 17:55:55 -04:00
Jasper St. Pierre f4c2c4c667 gtkwidget: Actually mark set_double_buffered as deprecated 2014-06-23 17:53:48 -04:00
Jasper St. Pierre 24b9e91f47 Revert "gtkwidget: Widgets are now always double-buffered"
This reverts commit b875572f2a.

Apps like Abiword, gnumeric and gnome-chess, and toolkits like
ClutterGTK were all using this for various purposes, and this made them
break. Bring back this feature for now.

It still won't work under Wayland.
2014-06-23 17:50:01 -04:00
Jasper St. Pierre 984e811c16 gdkwindow: Allow calling gdk_cairo_create outside of a "paint"
Apps had quite a bit of difficulty getting used to the new rules.
While we weren't expecting anything too deadly, it seemed that
gnumeric and Abiword both used gdk_cairo_create like this.
2014-06-23 17:50:00 -04:00
Jasper St. Pierre e67e8ebb30 gdkwindow: Remove extra arguments from process_updates_recurse_helper
These can easily be calculated inside the function.
2014-06-23 16:44:09 -04:00
Jasper St. Pierre 70fe57703b gdkwindow: Don't do some extra work
We can do an early return in some specific cases before we need to
create and clip a cairo region.
2014-06-23 16:43:32 -04:00
Jasper St. Pierre a9759c7756 gdkwindow: Remove an unused variable 2014-06-23 16:43:15 -04:00
Jasper St. Pierre 8eb092ea14 gdkwindow: Make the precondition of gdk_window_add_damage clearer 2014-06-23 15:00:01 -04:00
Jasper St. Pierre 06cfaea553 gdkwindow: Simplify check for damaging offscreen windows
If a window both has an impl and its impl_window is of type offscreen,
that must mean that it is the offscreen window, and the impl window is
itself. We can reduce the indirection here and make it more clear.
2014-06-23 15:00:01 -04:00
Jasper St. Pierre b99dc9eede gdkwindow: Make gdk_window_add_damage more private 2014-06-23 15:00:01 -04:00
Matthias Clasen 3d0dac0aef GtkIconTheme: Copy all fields in icon_info_dup
This functionality is only exercised by gnome-shell, currently.
Therefore, forgetting to copy a field here means an instant
gnome-shell crash :-(. More tests needed.
2014-06-23 12:20:59 -04:00
Matthias Clasen 30982b6d4e GtkIconTheme: Be more careful when warning
It sucks when printing a warning causes gnome-shell to crash,
so be more careful about icon names being NULL here.
2014-06-23 12:13:22 -04:00
Matthias Clasen 12a40cf8a6 GtkIconTheme: keep misplaced symbolics working
Recent changes made it a breaking mistake to install symbolic icons
of the wrong size into a theme directory, or into the legacy unthemed
icon location.

Since this change affects many apps, do the extra work to keep these
icons working, but emit warnings, in the hope that this will lead to
cleaning up the mess over time.
2014-06-23 08:18:42 -04:00
Matthias Clasen fe92c4478e Move some comments around 2014-06-22 22:04:00 -04:00
Matthias Clasen a44f01c573 Some documentation rewording 2014-06-22 16:46:11 -04:00
Matthias Clasen fe6cd7f2a5 Adwaita: Use rtl variants of pan-end when needed
The -gtk-icontheme() function not have any automatism for
symbolic or rtl variants built-in, instead, we expect the theme
to use selectors to provide the right icon for each situation.
2014-06-22 14:12:29 -04:00
Matthias Clasen 11e394b7b5 widget-factory: Fix another icon size problem
0 is still not a valid icon size.
2014-06-22 13:32:50 -04:00
Matthias Clasen d76785a993 win32: Drop remnants of def files
We no longer have .def files, so don't refer to them from the
win32 build machinery. Patch by Cilyan Olowen
2014-06-22 13:22:43 -04:00
Bastien Nocera 9d69ff697c placessidebar: Use symbolic name for symbolic icon
https://bugzilla.gnome.org/show_bug.cgi?id=731908
2014-06-22 12:23:52 -04:00
Matthias Clasen 4617fa7568 Docs: Reword deprecation notes
Mainly, make sure that deprecated properties are
documented as such. In this case: double-buffered.
2014-06-22 12:11:17 -04:00
Matthias Clasen f00a1f9aae notify test: Skip GtkWidget::double-buffered
This property is now deprecated, and ignored, thus: no notification.
2014-06-22 12:09:52 -04:00
Matthias Clasen a5543beced widget-factory: Fix an icon size problem
0 is not a valid icon size, and setting it has unpredictable
results. Replace it by 1, which is the right icon size to use
in buttons.
2014-06-22 11:52:11 -04:00
Matthias Clasen f5d7e54d33 GtkCellRendererPixbuf: Set force_scale_pixbuf
The recent icon theme scaling changes make the code more
sensitive to mis-sized icons (e.g. application icons in
the app chooser). A single row whose size gets blown out
of proportion by a big icon is never wanted in a list.
We can avoid this situation by telling GtkIconHelper to
force-scale the pixbuf to the requested size.
2014-06-22 11:52:11 -04:00
Matthias Clasen 6d83b173df GtkIconHelper: use FORCE_SCALE when force_scale_pixbuf is set
When force_scale_pixbuf is set, the icon helper will scale the
icon to the requested size (either the pixel size, or the resolved
icon size), so we can just as well instruct the icon theme code
to do the scaling for us.
2014-06-22 11:52:11 -04:00
Matthias Clasen 6cc32c24be GtkIconTheme: Drop an unused variable
We no longer need a separate field for symbolic icon size,
now that we are using the directory size.
2014-06-22 11:52:11 -04:00
Matthias Clasen b96058c3b7 GtkIconTheme: Load symbolic icons at the same size
Reuse the scale information that we have from loading icons
normally, when loading a symbolic icon, so that we apply the
same size constraints.

This commit assumes that svgs have the nominal size of the
directory they are in, which will be true for all current
symbolic icons.
2014-06-22 11:52:11 -04:00
Matthias Clasen 769fc52055 Adapt icontheme tests
With our new, improved icon theme spec compliance, some of the
tests need updates to their expected outcomes.
2014-06-22 11:52:11 -04:00
Matthias Clasen acb276c644 GtkIconInfo: Small struct packing improvement
This makes the GtkIconInfo struct a bit smaller.
2014-06-22 11:52:11 -04:00
Matthias Clasen f2b98f45db GtkIconInfo: Drop an unused field
The GtkIconInfo threshold field was never used, so lets not
carry it around.
2014-06-22 11:52:10 -04:00
Matthias Clasen a10412f49e GtkIconTheme: Respect limits in theme dirs
Previously, we were taking thresholds and min/max sizes into
account when choosing the best theme dir, but when it came
to loading the icon, we always scaled icons from scalable
directories all the way, ignoring the min/max size limits.

This commit changes things around so that we now load icons
in Threshold directories at their nominal size, and scale
icons in Scalable directories only up to the specified limits.

To override this and keep the previous behaviour of scaling
all the way to the desired size, use the GTK_ICON_THEME_FORCE_SIZE
flag.
2014-06-22 11:52:10 -04:00
Jasper St. Pierre 58715796d2 gdkwindow: Provide a default implementation of process_updates_recurse
As a quick code cleanup.
2014-06-22 10:20:50 -04:00
Jasper St. Pierre a1fb252eba gdkwindow-broadway: Move the dirty flag setting to end_paint
This is where it belongs -- process_updates_recurse is the wrong place
for it.
2014-06-22 10:20:50 -04:00
Jasper St. Pierre b59d2d1afa gdkwindow: Move a variable closer to where it's used
To make the code clearer.
2014-06-22 10:20:50 -04:00
Jasper St. Pierre b2be9c0a9b gdkwindow: Remove an unused variable 2014-06-22 10:20:49 -04:00
Matthias Clasen 1c57abb02b GtkSwitch: Implement hover for GtkSwitch
This makes switches more similar to other activatable widgets
like buttons or scales.
2014-06-21 21:34:50 -04:00
Jasper St. Pierre 0dfd506b3c gdkwidow: Make queue_antiexpose optional 2014-06-21 18:45:41 -04:00
Jasper St. Pierre 8ae546857c gdkwindow-win32: Remove queue_antiexpose implementation
Since the Win32 code never actually called InvalidateRgn or used the
Win32 update area at all, that meant the only thing that could possibly
invalidate the window was the Win32 window manager as part of scrolling
or resizing, which would also send it a WM_PAINT message.

But the WM_PAINT handling called BeginPaint / EndPaint, which clears the
update area completely! We also draw out-of-band, not directly when
handling WM_PAINT, so there's no way that the update area inside the
Win32 WM would match our local one.

There is no possible way that this queue_antiexpose implementation could
do anything. Remove it.
2014-06-21 18:45:40 -04:00
Jasper St. Pierre 4d8cd2f7cf gdkevents-win32: Remove dead code 2014-06-21 18:45:40 -04:00
Jasper St. Pierre c767d504c5 gdkwindow: Don't bother with a return parameter for queue_antiexpose
Standard refcounting works perfectly well. Don't give us the opportunity
for more memory leaks.
2014-06-21 18:45:39 -04:00
Jasper St. Pierre dcef61ac44 gdkwindow-broadway: Squash memory leak
We don't need to hang on to the update_area.
2014-06-21 18:45:39 -04:00
Jasper St. Pierre bb7bf07af6 gdkwindow-broadway: Make queue_antiexpose implementation private 2014-06-21 18:45:38 -04:00
Jasper St. Pierre 0bad7d8f5c gdkwindow-wayland: Attach new buffers and submit damage in end_paint
process_updates_recurse is simply the wrong place for it to be.
2014-06-21 18:45:38 -04:00
Jasper St. Pierre afbadd6639 gdkwindow-wayland: Rename listener -> frame_listener
Don't pollute the static namespace here.
2014-06-21 18:45:38 -04:00
Michael Catanzaro d9d0ba83ac docs: add missing apostrophe 2014-06-21 12:16:29 -05:00
Jasper St. Pierre 9036ed0d67 gdkwindow: Correct a signature
We removed the parameter from callers and from the implementation, but
not from the signature up top. I didn't notice because the branch I was
working on removed the signature entirely.
2014-06-21 11:25:40 -04:00
Jasper St. Pierre 47d6677e92 gdkwindow: Remove an extra region copy
This code is only called with the current paint region as its argument.
Instead of having to copy it and do a no-op intersect against itself,
just use the current paint directly.
2014-06-21 11:00:24 -04:00
Jasper St. Pierre 7fefd211b8 gdkwindow: Clean up code
Introduce a temporary to make the code a bit more clear under these cases.
2014-06-21 10:17:23 -04:00
Jasper St. Pierre e700305279 gdkwindow: Clean up formatting
Tabs to spaces, add some whitespace.
2014-06-21 10:17:06 -04:00
Jasper St. Pierre ec5e913a9b gdkwindow: Add some extra documentation to gdk_cairo_create
Mention the need to wrap the function inside
gdk_window_begin_paint_region and gdk_window_end_paint.
2014-06-21 10:01:33 -04:00
Benjamin Otte 93b3179042 widgetpath: Deprecate regions
This is a foolowup to d80bf0790d
2014-06-21 15:46:44 +02:00
Jasper St. Pierre 6bc251692a gtkwidget: Add a warning about set_double_buffered
As requested on the mailing list.
2014-06-21 00:31:17 -04:00
Jasper St. Pierre 28f381e936 testwindows: Remove another reference to set_double_buffered 2014-06-21 00:30:59 -04:00
Jasper St. Pierre 4a72563c7b gtktrayicon-x11: Stop using set_double_buffered
There's nothing better we can do for this case, now that we always
redirect drawing to a temporary pixmap. Maybe since this is already
X11-specific code, we should just do everything with Xlib directly.
2014-06-21 00:30:45 -04:00
Matthias Clasen 0ec00ffbb0 Adwaita: Fix highlight on check buttons
The .button style class does not apply to check and radio
buttons, and .check only applies to menuitems.
2014-06-20 23:17:53 -04:00
Jasper St. Pierre 60d39e973a gdkwindow: Squash a leak in the subsurface case
cairo_surface_create_for_rectangle takes a ref on the parent surface,
so we need to drop ours.

Rename get_window_surface to ref_window_surface to make the code more
clear and to stop this error from happening again.
2014-06-20 20:48:21 -04:00
Jasper St. Pierre d619a78aeb gdkwindow: Don't create a subsurface if we don't need to
In the case we have a native window, we don't need to crop it to a
non-native subrectangle, as abs_x / abs_y / width / height are all 0.
2014-06-20 20:46:49 -04:00
Jasper St. Pierre be30e440c3 gdkwindow: Remove the ability to call begin_paint_region more than once
Previously, each begin_paint_region added to a stack of current paints,
and when end_paint was called, the paint was popped off of the stack and
the surface was composited into the parent paint surface.

However, the code was broken in the case of a backend like Wayland which
didn't keep track of nested calls and simply wiped and returned the
native impl backing surface every time.

Since this feature is flat out unused by GTK+ and we don't want to
really support tricksy things like these for other clients, just remove
the feature. If somebody does call begin_paint_region more than once,
warn and return without doing anything.
2014-06-20 20:41:55 -04:00
Jasper St. Pierre d48adf9cee gdkwindow: Remove the internal cairo_surface used for out-of-band painting
Traditionally, the way painting was done in GTK+ was with the
"expose-event" handler, where you'd use GDK methods to do drawing on
your surface. In GTK+ 2.24, we added cairo support with gdk_cairo_create,
so you could paint your graphics with cairo.

Since then, we've added client-side windows, double buffering, the paint
clock, and various other enhancements, and the modern way to do drawing
is to connect to the "draw" signal on GtkWidget, which hands you a
cairo_t. To do double-buffering, the cairo_t we hand you is actually on
a secret surface, not the actual backing store of the window, and when
the draw handler completes we blit it into the main backing store
atomically.

The code to do this is with the APIs gdk_window_begin_paint_region,
which creates the temporary surface, and gdk_window_end_paint which
blits it back into the backing store. GTK+'s implementation of the
"draw" signal uses these APIs.

We've always sort-of supported people calling gdk_cairo_create
"outside" of a begin_paint / end_paint like old times, but then you're
not getting the benefit of double-buffering, and it's harder for GDK to
optimize.

Additionally, newer backends like Mir and Wayland can't actually support
this model, since they're based on double-buffering and swapping buffers
at various points in time. If we hand you a random cairo_t, we have no
idea when is a good time to swap.

Remove support for this.

This is technically a GDK API break: a warning is added in cases where
gdk_cairo_create is called outside of a paint cycle, and the returned
surface is a dummy that won't ever be composited back onto the main
surface. Testing with complex applications like Ardour didn't produce
any warnings.
2014-06-20 20:41:54 -04:00
Jasper St. Pierre b875572f2a gtkwidget: Widgets are now always double-buffered
gtk_widget_set_double_buffered is now deprecated, and we don't support
non-double-buffered widgets. This means that under normal circumstances,
paints are never outside of a begin_paint / end_paint sequence, which
natively-double-buffered backends like Wayland can't possibly support.
2014-06-20 20:41:54 -04:00
Jasper St. Pierre a85f7028d4 gdkwindow: Deprecate gdk_window_flush
The function does nothing.
2014-06-20 20:41:53 -04:00
Matthias Clasen 240daf55a1 GtkIconTheme: Drop an unused function 2014-06-20 20:40:52 -04:00
Matthias Clasen 2472cf22db GtkIconTheme: Small cleanup
Make the default symbolic colors a little more readable in the code.
2014-06-20 20:40:52 -04:00
Matthias Clasen 669bc909d8 GtkIconTheme: Trivial cleanup
Drop the _-prefix from a static function.
We've agreed to no stop using those prefixes.
2014-06-20 20:40:51 -04:00
Matthias Clasen d1918bbb69 Avoid a compiler warning
The name_offset variable is indeed unused.
2014-06-20 15:54:51 -04:00
Matthias Clasen a24ef62f4d Big spinner 2014-06-20 15:54:17 -04:00
Matthias Clasen 5ddacf094e GtkIconTheme: Don't create empty IconThemeDir structs
Starting gtk3-demo currently creates ~1200 of these, most
of them for nonexisting directories. Lets try to avoid that.
2014-06-20 12:15:25 -04:00
Matthias Clasen b4d12fff4e GtkIconCache: Add api to find if directories are empty
This will help in not creating structs for tons of empty
directories.
2014-06-20 12:15:25 -04:00
Matthias Clasen 5925f9eeb4 GtkStatusbar: Add some space between the frame and the label
Looks better this way.
2014-06-20 12:15:25 -04:00
Lapo Calamandrei 401bf15c9a Adwaita: check/radio selector simplification 2014-06-20 17:25:19 +02:00
Matthias Clasen f56345bbad widget factory: Use a property action for the toolbar toggle
This is slightly more elegant than doing it manually.
2014-06-20 11:13:33 -04:00
Matthias Clasen e7af95a40c widget factory: Add a statusbar
A widget that is not represented in the widget factory is likely
to not get proper attention from theme authors.
2014-06-20 11:10:22 -04:00
Matthias Clasen ef30b8c051 docs: Drop image references for stock items
Most of those images are no longer in our tree, so just
say which ones have icons and rtl variants, instead of
showing it.
2014-06-20 10:55:48 -04:00
Jasper St. Pierre 76922c169f wayland: Prevent stale paints and weird artifacts when using Weston
Weston releases buffers almost immediately after they're done, which
means that GTK+ doesn't use a temporary surface and instead paints
directly onto the SHM backing store that Weston will use.

Normally, after painting to the temporary surface, GTK+ *replaces*
the existing backing surface with CAIRO_OPERATOR_SOURCE. However,
if we immediately paint to the backing surface, it might have junk
from the last paint in it. So clear out the backing surface whenever
somebody calls begin_paint_region().

Maybe we should just always use the temporary surface like the X11
codepath, since that prevents us from having to do weird things like
this, but oh well.
2014-06-20 09:02:02 -04:00
Matthias Clasen 2672837a14 GtkIconTheme: Keep gtk_icon_theme_add_resource_path private for now
We need to discuss some details of the semantics before
we can make this public.
2014-06-20 08:50:31 -04:00
Matthias Clasen 4f1ff179bb Revert "Document gtk_icon_theme_add_resource_path"
This reverts commit 988b6b483d.
2014-06-20 08:46:42 -04:00
Matthias Clasen a31e8369f8 Revert "Deprecate gtk_icon_theme_add_builtin_icon"
This reverts commit 923eeda2d3.
2014-06-20 08:46:24 -04:00
Matthias Clasen 923eeda2d3 Deprecate gtk_icon_theme_add_builtin_icon 2014-06-20 01:17:47 -04:00
Matthias Clasen 988b6b483d Document gtk_icon_theme_add_resource_path 2014-06-20 01:17:47 -04:00
Matthias Clasen 99c0b3db06 Adapt the icontheme tests
With the new way of dealing with the legacy stock icons,
the builtin test needed some small updates.
2014-06-20 01:17:46 -04:00
Matthias Clasen 49bcaf844c GtkIconTheme: Include legacy stock icons from resources
Add /org/gtk/libgtk/icons as a resource path, and ensure
that we always parse an index.theme file for hicolor which
makes the builtin icons available as part of the hicolor theme.
2014-06-20 01:17:46 -04:00
Matthias Clasen 968ea4186d GtkIconTheme: Allow loading icons from resources
We add a new API, gtk_icon_theme_add_resource_path, which
can be used to add resource path as a base location for
icon theme content, similar to gtk_icon_theme_append_search_path.
2014-06-20 01:17:46 -04:00
Matthias Clasen 13c354db8d GtkIconTheme: Drop the all_icons hash table
It is not used anywhere anymore.
2014-06-20 01:17:46 -04:00
Matthias Clasen 11ec8f7285 GtkIconTheme: Stop using the all_icons hash table
This hash table was used in gtk_icon_theme_has_icon; we can
implement that function just as well without it and save some
memory.
2014-06-20 01:17:45 -04:00
Matthias Clasen a8939e7cff icontheme: Add some more tests
This test checks that gtk_icon_theme_list_icons and
gtk_icon_theme_has_icon work as expected.
2014-06-20 01:17:45 -04:00
Matthias Clasen 6549031030 Formatting fixes 2014-06-20 01:17:45 -04:00
Matthias Clasen aa44c0ca53 GtkIconTheme: Drop the code for parsing .icon files
Modern icon themes don't ship .icon files anyway.
2014-06-20 01:17:45 -04:00
Matthias Clasen 84bc9bba42 GtkIconTheme: Deprecate functionality related to .icon files
This functionality is not used at all in modern icon themes.
2014-06-20 01:17:45 -04:00
Matthias Clasen 36be12578c Drop the builtin icon cache
We don't need it anymore, now that the non-standard stock icons
are using resources.
2014-06-20 01:17:44 -04:00
Matthias Clasen ea8afd2937 Add non-standard stock icons as resources
This will allow us to remove the builtin icon cache in the future
while keeping the deprecated stock icons working.
2014-06-20 01:17:35 -04:00
Matthias Clasen 548a804653 Drop all standard icons from the builtin icontheme
We're going to require a complete icon theme, and we have
a test that checks for all the icons we use, so there is
no need to include all these fallback icons.
2014-06-20 00:52:20 -04:00
Benjamin Otte d80bf0790d stylecontext: Deprecate regions
Regions are done in a very non-css way. They don't fit the DOM in that
they don't integrate into the CSS tree and they have very weird matching
behavior in selectors.

So I'm deprecating them now. GtkNotebook and GtkTreeview will continue
to use them and as long as they do, we can't remove the code for it.
But once those are ported it might be safe to remove the code as it will
clean up lots of places in the code by quite a bit.
2014-06-19 22:26:51 +02:00
Benjamin Otte 8451b15d6e stylecontext: Remove long outdated docs
The part about transition animations doesn't apply since 3.8.
2014-06-19 22:26:51 +02:00
Jasper St. Pierre 87e2a7d4b2 gdkwindow-wayland: Destroy the wl_surface too when hiding a window
wl_surfaces can't switch roles, so destroying the xdg_surface but not
the wl_surface means that we could get an error when trying to re-map
the surface.

We could fix this by not destroying the xdg resource and only do it at
finalization time, but it's just as easy to just create a new wl_surface.
2014-06-19 15:10:54 -04:00
Jasper St. Pierre 6926c6d9f8 gdkwindow-wayland: Destroy the xdg roles before the wl_surface
Since the xdg roles are a special case of the surface, some compositors
like Weston destroy them automatically when the wl_surface is destroyed.
Thus, we need to destroy these first.
2014-06-19 15:10:54 -04:00
Jasper St. Pierre b35820fa3c gdkwindow-wayland: Add a forgotten ref 2014-06-19 14:56:17 -04:00
Jasper St. Pierre 0bbe2589f6 gdkwindow-wayland: Another slight rearrange 2014-06-19 14:56:17 -04:00
Jasper St. Pierre ec7504fd57 gdkwindow-wayland: Pair a ref with its owner 2014-06-19 14:56:17 -04:00
Jasper St. Pierre 12fc77ad98 gdkwindow-wayland: Don't post CONFIGURE events for the same size
The Wayland compositor is completely allowed to send us configure
events for the same size, and this validly happens if we're changing
states. Fizzle these out.
2014-06-19 14:56:16 -04:00
Matthias Clasen 0056d3a6ad GtkTreeView: Remove a no-longer-valid optimization
The rubberband rendering code was assuming that we just have
a 1-pixel border and the rest of the rubberband is uniform.
That is not a safe assumption to make with css-styled
rubberbands, so remove it.
2014-06-19 13:52:11 -04:00
Matthias Clasen 72ece5a62c GtkIconView: Remove a no-longer-valid optimization
The rubberband rendering code was assuming that we just have
a 1-pixel border and the rest of the rubberband is uniform.
That is not a safe assumption to make with css-styled
rubberbands, so remove it.
2014-06-19 13:52:11 -04:00
Matthias Clasen 640f9d110e Install the new icontheme test files 2014-06-19 13:52:10 -04:00
Lapo Calamandrei b7c51de62b Adwaita: fix rubberband selection 2014-06-19 19:11:02 +02:00
Jasper St. Pierre a0337f9755 Update Makefile.am for one more gitignore rule 2014-06-19 11:13:47 -04:00
Jasper St. Pierre c8547414c1 Update git.mk 2014-06-19 11:13:47 -04:00
Matthias Clasen c9e848b659 GtkIconTheme: Fix svg loading with FORCE_SIZE
Paradoxically, we were loading svgs at the nominal size when
FORCE_SIZE is specified, while scaling them exactly when it
isn't.
	../build/win32/vs10/gtk.vcxproj
2014-06-18 19:09:37 -04:00
Matthias Clasen a6f1f8dacf Add more icon theme tests
This test checks various directory size behaviours, with and
without the FORCE_SIZE flag.
2014-06-18 19:09:25 -04:00
Jakub Steiner 51417f98d1 Adwaita: hover state for horizontal spinbuttons 2014-06-18 20:40:19 +02:00
Nikita Churaev 462f86d301 New window shadows
https://bugzilla.gnome.org/show_bug.cgi?id=731866
2014-06-18 20:40:19 +02:00
Lapo Calamandrei 6eedc62af9 Adwaita: highligh not hilight... 2014-06-18 19:38:14 +02:00
Lapo Calamandrei a595dccf0e Adwaita: remove wildcard for image effect
-gtk-image-effect: hilight now is set for .button:hover
2014-06-18 19:29:33 +02:00
Lapo Calamandrei 060f7b7428 Adwaita: calendar fixes 2014-06-18 18:13:38 +02:00
Matthias Clasen baea175628 GtkHeaderBar: Don't forget to show the subtitle
https://bugzilla.gnome.org/show_bug.cgi?id=731790
2014-06-18 11:56:08 -04:00
Jakub Steiner e3a40065cc Adwaita: flatten buttons slightly.
- gets rid of the specialcase for dark too.
2014-06-18 16:36:41 +02:00
Lapo Calamandrei c975b9ef9b Adwaita: more links styling 2014-06-18 16:07:59 +02:00
Lars Uebernickel af0496dc68 themes: use .popover class instead of GtkPopover
https://bugzilla.gnome.org/show_bug.cgi?id=731834
2014-06-18 14:24:14 +02:00
Lars Uebernickel d0a3c8bd6f gtkpopover: set background and popover css classes
https://bugzilla.gnome.org/show_bug.cgi?id=731834
2014-06-18 14:24:14 +02:00
Lapo Calamandrei c2b7ebff11 Adwaita: remove bg from insensitive backdrop spinbutton buttons 2014-06-18 13:26:35 +02:00
Lapo Calamandrei f39a12e0c6 Adwaita: vertical spinbuttons inhert in backdrop state 2014-06-18 13:16:21 +02:00
Jakub Steiner 0ff5c41718 Adwaita: actionbars' padding 2014-06-18 12:16:55 +02:00
Lapo Calamandrei 630b5b9797 Adwaita: reorderable tabs correctly styled for every notebook layout 2014-06-18 12:08:04 +02:00
Lapo Calamandrei e1ae22465b Adwaita: set outline-color on selected items 2014-06-18 10:21:13 +02:00
Lapo Calamandrei 6cebdf80ac Adwaita: checks and radios text focus ring fix. 2014-06-18 10:11:11 +02:00
Lapo Calamandrei 0011c5c5e3 Adwaita: minor fixes. 2014-06-18 10:01:24 +02:00
Lapo Calamandrei 1566a5d9dd Adwaita: .scrollbars-junction 2014-06-18 09:52:29 +02:00
Yosef Or Boczko 6432dd0234 Updated Hebrew properties translation 2014-06-18 03:12:40 +03:00
Matthias Clasen d57793adb4 Include image data in the builtin icon theme cache
When we switched the default for gtk-update-icon-cache to
not include image data, we should have thought about the
builtin icons. For them, we rely on image data being included.

This made the notify test fail in gnome-continuous, where we
build from git and always regenerate the builtin cache.
2014-06-17 16:26:42 -04:00
Matthias Clasen 8253b76bf6 Add a test for builtin icons
We want to get rid of these, but as long as we still have them,
make sure they work.
2014-06-17 14:38:18 -04:00
Alexander Larsson 3574a809fa icon theme: Fix crash for builtin icons
This pushes the initialization of is_svg to an earlier point
when the GtkIconInfo is created. This is needed because an icon
info doesn't necessarily always have a filename that we can later
extract the suffix from. For instance, builtin icons have NULL
filename.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-17 13:54:13 -04:00
Jakub Steiner d87d62fe73 Adwaita: selection mode buttons to have borders and fill 2014-06-17 15:55:58 +02:00
Jakub Steiner e591c8ab41 Adwaita: symbolic checkboxes for selection mode. 2014-06-17 15:41:59 +02:00
Jakub Steiner 0ce17d4aca Adwaita: make bash actually call sass 2014-06-17 15:39:45 +02:00
Chun-wei Fan 2e0ce67f8a Visual Studio Builds: "Install" the Stock Icons
Copy the icons in stock_icons accordingly, so that the built-in icons can
be found by GTK, as it seems that not all of them are built into
gtkbuiltincache.h.
2014-06-17 17:54:04 +08:00
Benjamin Otte aeac92a497 testsuite: Add test for latest commit 2014-06-17 00:01:25 +02:00
Benjamin Otte aa6652aac7 cssprovider: Names starting with -gtk- aren't style props
We want to have the "-gtk-" prefix for our custom CSS properties. But
we also want to parse names starting with a "-" as style properties.
So make sure that "-gtk-" is treated like a normal property and we emit
errors when somebody uses it wrong.

This is to catch errors with people typing
  -gtk-iconsource: none;
instead of the correct
  -gtk-icon-source: none;
2014-06-17 00:01:25 +02:00
Matthias Clasen f0f9c2aa37 Revert "gtkbin: replace internal api"
This reverts commit 0f4751c08e.

This causes warnings from the notebook and combobox code.
2014-06-16 17:31:56 -04:00
Piotr Drąg b57c04de5c Updated POTFILES.skip 2014-06-16 22:12:39 +02:00
Ryan Lortie b532e1ff0a menu binding: emit submenu close after activate
We want to make sure that the submenu action is changed back to FALSE
_after_ the menu item has been activated.  This prevents the menu
teardown handler from deleting the menu item before it can be activated.

Unfortunately, GtkMenuShell emits "hide" before the item activation.
This is probably done to prevent the application from doing things like
showing dialogs when the menu is still holding the grab.

In the case where we are doing an activate, set a boolean flag on each
of the open menus (following the parent stack) indicating that we'll be
emitting another signal soon (selection done).  If that flag is set, we
defer the setting of the submenu action until we receive the second
signal.

https://bugzilla.gnome.org/show_bug.cgi?id=729820
2014-06-16 15:34:42 -04:00
Jasper St. Pierre 38a6a72a7f Makefile: Add a few more cleanfile / ignore rules 2014-06-16 14:03:53 -04:00
Jasper St. Pierre 0855d55668 Makefile: Add gtk.gresource.xml to gitignore 2014-06-16 14:03:53 -04:00
Lapo Calamandrei 085de60305 Adwaita: list-row styling 2014-06-16 19:58:37 +02:00
Benjamin Otte 0e64019df3 testsuite: Remove a test
That test is not working anymore by design since commit 57c4f01e.

It was introduced pre-3.0.0 in commit 12d6b588 and the feature was never
utilized. So it seems safe to just remove the test.
2014-06-16 18:43:50 +02:00
Benjamin Otte fba90d4c65 colorswatch: handle clip for box-shadow 2014-06-16 18:43:49 +02:00
Lapo Calamandrei b1cca3aa11 Adwaita: fix a typo 2014-06-16 17:14:20 +02:00
Lapo Calamandrei 490cb30c78 Adwaita: GtkPaned separator invisible border shrinking 2014-06-16 17:12:03 +02:00
Lapo Calamandrei 67b4749be0 Adwaita: fix column-header backdrop state 2014-06-16 17:07:27 +02:00
Jasper St. Pierre c2bf7a887c gtkicontheme: Fix a missing case where we forget to set is_svg
When duplicating the icon_info, we forgot to set is_svg. This meant that
any application that used gtk_icon_info_load_icon_async wouldn't have
is_svg set properly.

This fixes blurry icons in the gnome-shell app picker.
2014-06-16 10:47:34 -04:00
Jasper St. Pierre c4fc71058a util: Add missing git.mk include 2014-06-16 10:47:33 -04:00
Lapo Calamandrei aa339ee30c Adwaita: column headers visual simplification 2014-06-16 16:46:05 +02:00
Chun-wei Fan cf8eaebc07 GtkInspector: Use Adwaita by Default on Windows Too
As we are using Adwaita by default on all platforms, do the same for
GtkInspector, to be consistent with the rest of GTK+.
2014-06-16 12:07:04 +08:00
Paolo Borelli 715b8744f5 TextView: render the background of border windows
Set the .top, .left, etc css classes and render the background
of the border windows.
Change the reftest implementation accordingly.
2014-06-15 18:57:06 +02:00
Paolo Borelli 2eeff1eed6 Add a TextView reftests checking border-windows
TextView border windows are internal windows used to draw on the gutter
of the textview (e.g. line numbers). The test uses the gmodule hook to
programmatically draw on the border-windows at each side of the textview
and compares the result with 3x3 grid of labels.
2014-06-15 18:56:30 +02:00
Paolo Borelli 2c5be3b231 TextView margin reftest
add a reftest that checks GtkTextView text margin property comparing
with the normal margin added to the widget (they are the same when there
is nothing drawn in the gutter like line numbers etc).
2014-06-15 18:15:43 +02:00
Paolo Borelli 570653354a Dist recently added reftests 2014-06-15 12:05:40 +02:00
Kalev Lember 71ac15ec2f Fix another typo 2014-06-15 11:24:39 +02:00
Matthias Clasen d58a3439e4 Fix a typo 2014-06-15 04:15:32 -04:00
Matthias Clasen 0cb7031d1d Install all icons for installed tests
Otherwise the icontheme test fails in continuous.
2014-06-14 22:52:57 -04:00
Matthias Clasen c1476bf1d7 Revert "Fixes GtkMenuTrackerItem visible flag reference"
This reverts commit ceed0ee703.
2014-06-14 21:43:14 -04:00
Will Greenberg ceed0ee703 Fixes GtkMenuTrackerItem visible flag reference
Previously GtkMenuTracker tried to access "gtk_menu_tracker_item_get_is_visible",
but the correct getter is "_gtk_menu_tracker_item_is_visible". This commit
corrects this reference

https://bugzilla.gnome.org/show_bug.cgi?id=731430
2014-06-14 21:26:22 -04:00
Matthias Clasen a666827d3a gtk-update-icon-cache: Add an --include-image-data option
Now that we don't include the image data by default anymore,
lets add an option that  does it.
2014-06-14 19:30:17 -04:00
Matthias Clasen 62f8dae7a8 gtkicontheme: Don't query CONTENT_TYPE to determine svg
We already know based on the suffix of the filename.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-14 18:54:24 -04:00
Jasper St. Pierre 6f92c7942e updateiconcache: Don't include image data by default anymore
Since large images are in the icon cache, and apps don't tend to use that
many icons anymore, simply don't include image data and instead make apps
load files from disk. Additionally, since they're stored in GdkPixbuf data,
that means that we have to first convert them either to a cairo_surface_t,
which requires converting pixel data to be premulitplied, or an OpenGL
texture, which requires a whole GPU upload anyway.

So, even with the icon cache, the goal of icons through zero-copy, mmap()'d
data from disk just isn't doable with the icon cache format we have. The
icon cache on my disk is nearing 100MB, since we include a bunch of
high-resolution application icons, that I doubt would be used by apps at all.
Removing this inefficient pixel data makes memory usage for all applications
go down, with no speed loss.

The icon cache also, however, has an index of what icons are in each folder,
which prevents a readdir() and allows GTK+ to know what icon is where without
having to do a bunch of stat(); calls. Keeping this data is good for GTK+,
so we should still keep the index.

It doesn't make sense to remove any code for mapping pixel data from the icon
cache. There's a plan in the works to have a symbolic icon cache that does
pixel math on 16x16 icons to prevent slow SVG rendering. 16x16 pixels are
fairly small, and such images are flat colors, which should compress easily,
so the icon cache would be worthwhile here. So let's keep the code around
in preparation for that case.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-14 16:08:24 -04:00
Paolo Borelli c184458ab3 notebook: set tab position style class on the main frame
We want to have .top etc also on the notebook frame, not only on
the header frame.
The patch includes a reftest by Benjamin.
2014-06-14 21:37:07 +02:00
Matthias Clasen fea939b3d7 GtkIconTheme: Don't treat svg icons specially
This changes makes svg icons go through the same scale calculation
code as png icons. As a consequence, an svg that is put into the
32x32 directory will actually be loaded at size 32, even if it
gets requested at a bigger size. This will let us avoid giant
spinners.

https://bugzilla.gnome.org/show_bug.cgi?id=731658
2014-06-14 15:10:49 -04:00
Matthias Clasen 84cf748eae Add more icontheme tests
This test is focused on svgs, and how we scale them when
loading.
2014-06-14 15:10:49 -04:00
Lapo Calamandrei fd53732035 Adwaita: try to make scrollbars near paned separator usable. 2014-06-14 19:06:26 +02:00
Piotr Drąg 4406386ad9 Remove duplicate lines in Azerbaijani translation headers 2014-06-14 16:46:06 +02:00
Lapo Calamandrei b939b17f51 Adwaita: comment added 2014-06-14 15:37:36 +02:00
Lapo Calamandrei 40775415cc Adwaita: fix GtkScale outline offset and radius 2014-06-14 15:31:05 +02:00
Lapo Calamandrei 77a4b253df Adwaita: Gtkscale
- added slider assets for scales with marks
- experimental touch friendly fine-tune mode, grow the trough istead
  of shrinking the slider
2014-06-14 14:51:03 +02:00
Rico Tzschichholz e3443c9cf5 Adwaita: drop references to render-borders.sh/borders.txt
They were dropped with 82b1232898
2014-06-14 13:13:29 +02:00
Lapo Calamandrei 83bc345b50 Adwaita: noticiable scale slider active state for the dark variant 2014-06-14 11:30:22 +02:00
Lapo Calamandrei b10e358f5e Adwaita: include missing assets 2014-06-14 11:01:31 +02:00
Lapo Calamandrei a1991df8d3 Adwaita: darker base color for the dark variant 2014-06-14 11:00:33 +02:00
Lapo Calamandrei a6de44ac69 Adwaita: dark var backdrop insensitive fixes
Consistent backdrop insensitive state for dark variant GtkScale and GtkSwitch
2014-06-14 10:48:28 +02:00
Lapo Calamandrei 54e4c11ed1 Adwaita: GtkScale
slider :hover state added
2014-06-14 10:19:15 +02:00
Lapo Calamandrei 3d70add7f6 Adwaita: sidebar separator and selected item backdrop fix 2014-06-14 09:00:21 +02:00
Lapo Calamandrei 04a1a15e88 Adwaita: added a missing border to GtkFileChooser 2014-06-14 08:45:55 +02:00
Lapo Calamandrei 7fd675e4f6 Adwaita: better tab close button 2014-06-14 08:42:12 +02:00
Lapo Calamandrei 82b1232898 Adwaita: remove old cruft not used anymore 2014-06-14 08:31:36 +02:00
Lapo Calamandrei a1bf6718f5 check and radio assets refresh 2014-06-14 08:29:47 +02:00
Stefan Sauer 406974fdb1 scrolledwindow: update GtkPolicyType docs
The policy is not determining the visibility of the scrollbars anymore, but the
how the size is to be computed to achive the selected visibility.
2014-06-14 08:10:46 +02:00
Stefan Sauer 0f4751c08e gtkbin: replace internal api 2014-06-14 08:10:46 +02:00
Matthias Clasen aba6871dba inspector: Use Adwaita as default theme 2014-06-14 00:15:09 -04:00
Matthias Clasen 5d7c79574b Use Adwaita on Windows too
Having the same, usable, default appearance acroll platforms
trumps having a more-or-less working native theme. The default
will be Adwaita on all platforms. The native ms-windows theme
is of course still available.
2014-06-13 16:49:59 -04:00
Matthias Clasen 3ae4c8f125 Adwaita: bring back the extra indirection
Without this, we are missing the 'Adwaita' component in the
path when resolving relative resources, and none of the assets
are found.
2014-06-13 14:44:38 -04:00
Matthias Clasen 6cc5908d88 Try to fix the continuous build
Making gtk.gresource.xml generated was causing a problem for
srcdir!=builddir builds from git. Builds from tarballs are
not affected, because the tarball contains the generated file.
2014-06-13 14:16:37 -04:00
Matthias Clasen 4225a8eaf3 Add some EXEEXT decorations back
Might fix
https://bugzilla.gnome.org/show_bug.cgi?id=731602
2014-06-13 14:03:52 -04:00
Matthias Clasen cefa19d30c Use Adwaita as the default theme
This ensures that GTK+ applications have a high-quality theme on
all platforms, and look consistent.
2014-06-13 13:20:58 -04:00
Matthias Clasen b4e1e01acc Include the Adwaita theme
This adds the resources for the Adwaita theme, and includes them
in libgtk, on all platforms.
2014-06-13 13:20:47 -04:00
812 changed files with 16740 additions and 76978 deletions
+1
View File
@@ -24,6 +24,7 @@ MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(srcdir)/m4/gtk-doc.m4 \
$(srcdir)/INSTALL \
$(srcdir)/README \
$(srcdir)/omf.make \
+25
View File
@@ -771,6 +771,16 @@ mkdir $(CopyDir)\share\icons\hicolor\16x16\apps
copy ..\..\..\demos\gtk-demo\data\16x16\gtk3-demo.png $(CopyDir)\share\icons\hicolor\16x16\apps\
mkdir $(CopyDir)\share\icons\hicolor\16x16\actions
copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\16x16\actions\
mkdir $(CopyDir)\share\icons\hicolor\20x20\actions
copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\20x20\actions\
mkdir $(CopyDir)\share\icons\hicolor\22x22\apps
copy ..\..\..\demos\gtk-demo\data\22x22\gtk3-demo.png $(CopyDir)\share\icons\hicolor\22x22\apps\
@@ -781,16 +791,31 @@ mkdir $(CopyDir)\share\icons\hicolor\24x24\apps
copy ..\..\..\demos\gtk-demo\data\24x24\gtk3-demo.png $(CopyDir)\share\icons\hicolor\24x24\apps\
mkdir $(CopyDir)\share\icons\hicolor\24x24\actions
copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\24x24\actions\
mkdir $(CopyDir)\share\icons\hicolor\32x32\apps
copy ..\..\..\demos\gtk-demo\data\32x32\gtk3-demo.png $(CopyDir)\share\icons\hicolor\32x32\apps\
mkdir $(CopyDir)\share\icons\hicolor\32x32\actions
copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\32x32\actions\
mkdir $(CopyDir)\share\icons\hicolor\48x48\apps
copy ..\..\..\demos\gtk-demo\data\48x48\gtk3-demo.png $(CopyDir)\share\icons\hicolor\48x48\apps\
mkdir $(CopyDir)\share\icons\hicolor\48x48\actions
copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\48x48\actions\
mkdir $(CopyDir)\share\icons\hicolor\256x256\apps
copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps\
+15
View File
@@ -398,18 +398,33 @@ copy ..\..\..\libgail-util\gailtextutil.h $(CopyDir)\include\gail-$(ApiVersion)\
mkdir $(CopyDir)\share\icons\hicolor\16x16\apps

copy ..\..\..\demos\gtk-demo\data\16x16\gtk3-demo.png $(CopyDir)\share\icons\hicolor\16x16\apps\

mkdir $(CopyDir)\share\icons\hicolor\16x16\actions

copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\16x16\actions\

mkdir $(CopyDir)\share\icons\hicolor\20x20\actions

copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\20x20\actions\

mkdir $(CopyDir)\share\icons\hicolor\22x22\apps

copy ..\..\..\demos\gtk-demo\data\22x22\gtk3-demo.png $(CopyDir)\share\icons\hicolor\22x22\apps\

mkdir $(CopyDir)\share\icons\hicolor\24x24\apps

copy ..\..\..\demos\gtk-demo\data\24x24\gtk3-demo.png $(CopyDir)\share\icons\hicolor\24x24\apps\

mkdir $(CopyDir)\share\icons\hicolor\24x24\actions

copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\24x24\actions\

mkdir $(CopyDir)\share\icons\hicolor\32x32\apps

copy ..\..\..\demos\gtk-demo\data\32x32\gtk3-demo.png $(CopyDir)\share\icons\hicolor\32x32\apps\

mkdir $(CopyDir)\share\icons\hicolor\32x32\actions

copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\32x32\actions\

mkdir $(CopyDir)\share\icons\hicolor\48x48\apps

copy ..\..\..\demos\gtk-demo\data\48x48\gtk3-demo.png $(CopyDir)\share\icons\hicolor\48x48\apps\

mkdir $(CopyDir)\share\icons\hicolor\48x48\actions

copy ..\..\..\gtk\stock-icons\*.png $(CopyDir)\share\icons\hicolor\48x48\actions\

mkdir $(CopyDir)\share\icons\hicolor\256x256\apps

copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps\

+1 -1
View File
@@ -41,7 +41,7 @@ AC_CANONICAL_HOST
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.41.0])
m4_define([glib_required_version], [2.41.1])
m4_define([pango_required_version], [1.32.4])
m4_define([atk_required_version], [2.12.0])
m4_define([cairo_required_version], [1.12.0])
-1
View File
@@ -248,7 +248,6 @@ gtk_rotated_bin_realize (GtkWidget *widget)
attributes.height = allocation.height - 2 * border_width;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
| GDK_POINTER_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
-1
View File
@@ -187,7 +187,6 @@ gtk_mirror_bin_realize (GtkWidget *widget)
attributes.height = allocation.height - 2 * border_width;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
| GDK_POINTER_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
+9 -15
View File
@@ -38,20 +38,6 @@ change_theme_state (GSimpleAction *action,
g_simple_action_set_state (action, state);
}
static void
change_toolbar_state (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *toolbar;
toolbar = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "toolbar"));
gtk_widget_set_visible (toolbar, g_variant_get_boolean (state));
g_simple_action_set_state (action, state);
}
static void
activate_search (GSimpleAction *action,
GVariant *parameter,
@@ -291,7 +277,6 @@ activate (GApplication *app)
GtkAdjustment *adj;
static GActionEntry win_entries[] = {
{ "dark", NULL, NULL, "false", change_theme_state },
{ "toolbar", NULL, NULL, "true", change_toolbar_state },
{ "search", activate_search, NULL, NULL, NULL },
{ "delete", activate_delete, NULL, NULL, NULL }
};
@@ -310,6 +295,15 @@ activate (GApplication *app)
win_entries, G_N_ELEMENTS (win_entries),
window);
widget = (GtkWidget *)gtk_builder_get_object (builder, "statusbar");
gtk_statusbar_push (GTK_STATUSBAR (widget), 0, "All systems are operating normally.");
g_action_map_add_action (G_ACTION_MAP (window),
G_ACTION (g_property_action_new ("statusbar", widget, "visible")));
widget = (GtkWidget *)gtk_builder_get_object (builder, "toolbar");
g_action_map_add_action (G_ACTION_MAP (window),
G_ACTION (g_property_action_new ("toolbar", widget, "visible")));
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar3");
pulse_id = g_timeout_add (250, (GSourceFunc)pulse_it, widget);
g_signal_connect (gtk_builder_get_object (builder, "adjustment1"),
+30 -2
View File
@@ -327,7 +327,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<object class="GtkImage" id="button224img">
<property name="visible">True</property>
<property name="icon-name">window-close-symbolic</property>
<property name="icon-size">0</property>
<property name="icon-size">1</property>
</object>
</child>
</object>
@@ -1829,7 +1829,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<object class="GtkImage" id="page2dismissi">
<property name="visible">True</property>
<property name="icon-name">window-close-symbolic</property>
<property name="icon-size">0</property>
<property name="icon-size">1</property>
</object>
</child>
</object>
@@ -2428,6 +2428,17 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<property name="action_name">win.toolbar</property>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="statusbarmenuitem">
<property name="label">_Statusbar</property>
<property name="visible">True</property>
<property name="active">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="action_name">win.statusbar</property>
</object>
</child>
</object>
</child>
</object>
@@ -2530,6 +2541,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
</child>
</object>
</child>
<child>
<object class="GtkStatusbar" id="statusbar">
<property name="visible">True</property>
<property name="no-show-all">True</property>
</object>
</child>
</object>
</child>
</object>
@@ -2724,6 +2741,17 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<property name="title" translatable="yes">Page 2</property>
</packing>
</child>
<child>
<object class="GtkSpinner">
<property name="visible">True</property>
<property name="active">True</property>
<property name="expand">True</property>
</object>
<packing>
<property name="name">page3</property>
<property name="title" translatable="yes">Page 3</property>
</packing>
</child>
</object>
</child>
</object>
-119
View File
@@ -179,125 +179,6 @@ expand_content_files = \
# Images to copy into HTML directory
HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/help-about.png \
$(top_srcdir)/gtk/stock-icons/24/list-add.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-apply.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-bold.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-cancel.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-caps-lock-warning.png \
$(top_srcdir)/gtk/stock-icons/24/media-optical.png \
$(top_srcdir)/gtk/stock-icons/24/edit-clear.png \
$(top_srcdir)/gtk/stock-icons/24/window-close.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-connect.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-convert.png \
$(top_srcdir)/gtk/stock-icons/24/edit-copy.png \
$(top_srcdir)/gtk/stock-icons/24/edit-cut.png \
$(top_srcdir)/gtk/stock-icons/24/edit-delete.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-password.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-error.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-information.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-question.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-warning.png \
$(top_srcdir)/gtk/stock-icons/24/folder.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-disconnect.png \
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd.png \
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd-multiple.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-edit.png \
$(top_srcdir)/gtk/stock-icons/24/system-run.png \
$(top_srcdir)/gtk/stock-icons/24/text-x-generic.png \
$(top_srcdir)/gtk/stock-icons/24/edit-find.png \
$(top_srcdir)/gtk/stock-icons/24/edit-find-replace.png \
$(top_srcdir)/gtk/stock-icons/24/go-bottom.png \
$(top_srcdir)/gtk/stock-icons/24/go-first-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-first-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-last-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-last-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-top.png \
$(top_srcdir)/gtk/stock-icons/24/go-previous-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-previous-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-down.png \
$(top_srcdir)/gtk/stock-icons/24/go-next-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-next-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-up.png \
$(top_srcdir)/gtk/stock-icons/24/drive-harddisk.png \
$(top_srcdir)/gtk/stock-icons/24/network-idle.png \
$(top_srcdir)/gtk/stock-icons/24/help-contents.png \
$(top_srcdir)/gtk/stock-icons/24/go-home.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-index.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-italic.png \
$(top_srcdir)/gtk/stock-icons/24/go-jump-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-jump-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-center.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-fill.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-left.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-right.png \
$(top_srcdir)/gtk/stock-icons/24/image-missing.png \
$(top_srcdir)/gtk/stock-icons/24/document-new.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-no.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-ok.png \
$(top_srcdir)/gtk/stock-icons/24/document-open.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/edit-paste.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png \
$(top_srcdir)/gtk/stock-icons/24/document-print.png \
$(top_srcdir)/gtk/stock-icons/24/printer-error.png \
$(top_srcdir)/gtk/stock-icons/24/printer-paused.png \
$(top_srcdir)/gtk/stock-icons/24/document-print-preview.png \
$(top_srcdir)/gtk/stock-icons/24/printer-info.png \
$(top_srcdir)/gtk/stock-icons/24/printer-warning.png \
$(top_srcdir)/gtk/stock-icons/24/document-properties.png \
$(top_srcdir)/gtk/stock-icons/24/application-exit.png \
$(top_srcdir)/gtk/stock-icons/24/edit-redo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/edit-redo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/view-refresh.png \
$(top_srcdir)/gtk/stock-icons/24/list-remove.png \
$(top_srcdir)/gtk/stock-icons/24/document-revert-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/document-revert-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-floppy.png \
$(top_srcdir)/gtk/stock-icons/24/document-save.png \
$(top_srcdir)/gtk/stock-icons/24/document-save-as.png \
$(top_srcdir)/gtk/stock-icons/24/edit-select-all.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-select-color.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-color-picker.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-font.png \
$(top_srcdir)/gtk/stock-icons/24/view-sort-ascending.png \
$(top_srcdir)/gtk/stock-icons/24/view-sort-descending.png \
$(top_srcdir)/gtk/stock-icons/24/tools-check-spelling.png \
$(top_srcdir)/gtk/stock-icons/24/process-stop.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-strikethrough.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-underline.png \
$(top_srcdir)/gtk/stock-icons/24/edit-undo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/edit-undo-rtl.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-yes.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-original.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-fit-best.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-in.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-out.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-pause.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-record.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-stop.png \
$(top_srcdir)/gtk/stock-icons/24/view-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/view-restore.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/action-bar.png \
+10 -1
View File
@@ -32,7 +32,10 @@
<command>gtk-update-icon-cache</command>
<arg choice="opt">--force</arg>
<arg choice="opt">--ignore-theme-index</arg>
<arg choice="opt">--index-only</arg>
<group>
<arg choice="plain">--index-only</arg>
<arg choice="plain">--include-image-data</arg>
</group>
<arg choice="opt">--source <arg choice="plain"><replaceable>NAME</replaceable></arg></arg>
<arg choice="opt">--quiet</arg>
<arg choice="opt">--validate</arg>
@@ -87,6 +90,12 @@
</para></listitem>
</varlistentry>
<varlistentry>
<term>--include-image-data</term>
<listitem><para>Include image data in the cache.
</para></listitem>
</varlistentry>
<varlistentry>
<term>--source</term>
<term>-c</term>
+6 -17
View File
@@ -194,8 +194,8 @@ endif # USE_QUARTZ
if USE_WIN32
libgdk_3_la_SOURCES += gdkkeynames.c
libgdk_3_la_LIBADD += win32/libgdk-win32.la
libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o
libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o
endif # USE_WIN32
if USE_BROADWAY
@@ -345,22 +345,11 @@ CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif # HAVE_INTROSPECTION
if OS_WIN32
install-def-file: gdk.def
mkdir -p $(DESTDIR)$(libdir)
$(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-3.0.def
uninstall-def-file:
-rm $(DESTDIR)$(libdir)/gdk-win32-3.0.def
else
install-def-file:
uninstall-def-file:
endif
if MS_LIB_AVAILABLE
noinst_DATA = gdk-win32-$(GTK_API_VERSION).lib
gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la gdk.def
lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -def:gdk.def -out:$@
gdk-win32-$(GTK_API_VERSION).lib: libgdk-win32-$(GTK_API_VERSION).la
lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgdk-win32-$(GTK_API_VERSION)-@LT_CURRENT_MINUS_AGE@.dll -out:$@
install-ms-lib:
mkdir -p $(DESTDIR)$(libdir)
@@ -457,9 +446,9 @@ dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../buil
DISTCLEANFILES = gdkconfig.h stamp-gc-h
install-data-local: install-ms-lib install-def-file
install-data-local: install-ms-lib
uninstall-local: uninstall-ms-lib uninstall-def-file
uninstall-local: uninstall-ms-lib
rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h
# if srcdir!=builddir, clean out maintainer-clean files from builddir
-2
View File
@@ -45,8 +45,6 @@ void _gdk_broadway_window_register_dnd (GdkWindow *window);
GdkDragContext * _gdk_broadway_window_drag_begin (GdkWindow *window,
GdkDevice *device,
GList *targets);
gboolean _gdk_broadway_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area);
void _gdk_broadway_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
+8 -32
View File
@@ -368,16 +368,6 @@ _gdk_broadway_window_destroy (GdkWindow *window,
impl->id);
}
static gboolean
gdk_window_broadway_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
/* Image surfaces cannot be resized */
return FALSE;
}
static void
gdk_broadway_window_destroy_foreign (GdkWindow *window)
{
@@ -1001,6 +991,13 @@ gdk_broadway_window_get_input_shape (GdkWindow *window)
return NULL;
}
static void
gdk_broadway_window_end_paint (GdkWindow *window)
{
GdkWindowImplBroadway *impl;
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
impl->dirty = TRUE;
}
static gboolean
gdk_window_broadway_set_static_gravities (GdkWindow *window,
@@ -1483,18 +1480,6 @@ gdk_broadway_window_set_composited (GdkWindow *window,
{
}
static void
gdk_broadway_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
GdkWindowImplBroadway *impl;
_gdk_window_process_updates_recurse (window, region);
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
impl->dirty = TRUE;
}
void
_gdk_broadway_display_before_process_all_updates (GdkDisplay *display)
{
@@ -1505,13 +1490,6 @@ _gdk_broadway_display_after_process_all_updates (GdkDisplay *display)
{
}
gboolean
_gdk_broadway_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
return TRUE;
}
guint32
gdk_broadway_get_last_seen_time (GdkWindow *window)
{
@@ -1549,12 +1527,11 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
impl_class->shape_combine_region = gdk_window_broadway_shape_combine_region;
impl_class->input_shape_combine_region = gdk_window_broadway_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_broadway_set_static_gravities;
impl_class->queue_antiexpose = _gdk_broadway_window_queue_antiexpose;
impl_class->destroy = _gdk_broadway_window_destroy;
impl_class->destroy_foreign = gdk_broadway_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_broadway_resize_cairo_surface;
impl_class->get_shape = gdk_broadway_window_get_shape;
impl_class->get_input_shape = gdk_broadway_window_get_input_shape;
impl_class->end_paint = gdk_broadway_window_end_paint;
impl_class->beep = gdk_broadway_window_beep;
impl_class->focus = gdk_broadway_window_focus;
@@ -1598,7 +1575,6 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
impl_class->destroy_notify = gdk_broadway_window_destroy_notify;
impl_class->register_dnd = _gdk_broadway_window_register_dnd;
impl_class->drag_begin = _gdk_broadway_window_drag_begin;
impl_class->process_updates_recurse = gdk_broadway_window_process_updates_recurse;
impl_class->sync_rendering = _gdk_broadway_window_sync_rendering;
impl_class->simulate_key = _gdk_broadway_window_simulate_key;
impl_class->simulate_button = _gdk_broadway_window_simulate_button;
+5 -9
View File
@@ -205,7 +205,11 @@ struct _GdkWindow
cairo_pattern_t *background;
GSList *paint_stack;
struct {
cairo_region_t *region;
cairo_surface_t *surface;
gboolean surface_needs_composite;
} current_paint;
cairo_region_t *update_area;
guint update_freeze_count;
@@ -228,9 +232,6 @@ struct _GdkWindow
guint shaped : 1;
guint support_multidevice : 1;
guint synthesize_crossing_event_queued : 1;
guint effective_visibility : 2;
guint visibility : 2; /* The visibility wrt the toplevel (i.e. based on clip_region) */
guint native_visibility : 2; /* the native visibility of a impl windows */
guint viewable : 1; /* mapped and all parents mapped */
guint applied_shape : 1;
guint in_update : 1;
@@ -266,8 +267,6 @@ struct _GdkWindow
cairo_region_t *shape;
cairo_region_t *input_shape;
cairo_surface_t *cairo_surface;
GList *devices_inside;
GHashTable *device_events;
@@ -372,9 +371,6 @@ GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel,
double *found_x,
double *found_y);
void _gdk_window_add_damage (GdkWindow *toplevel,
cairo_region_t *damaged_region);
GdkEvent * _gdk_make_event (GdkWindow *window,
GdkEventType type,
GdkEvent *event_in_queue,
+1 -23
View File
@@ -542,23 +542,10 @@ gdk_offscreen_window_get_geometry (GdkWindow *window,
}
}
static gboolean
static void
gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
return FALSE;
}
static gboolean
gdk_offscreen_window_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
/* No-op. The surface gets resized in
* gdk_offscreen_window_move_resize_internal().
*/
return TRUE;
}
/**
@@ -664,13 +651,6 @@ gdk_offscreen_window_set_transient_for (GdkWindow *window,
{
}
static void
gdk_offscreen_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
_gdk_window_process_updates_recurse (window, region);
}
static void
gdk_offscreen_window_get_frame_extents (GdkWindow *window,
GdkRectangle *rect)
@@ -727,7 +707,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
impl_class->destroy = gdk_offscreen_window_destroy;
impl_class->destroy_foreign = NULL;
impl_class->resize_cairo_surface = gdk_offscreen_window_resize_cairo_surface;
impl_class->get_shape = NULL;
impl_class->get_input_shape = NULL;
impl_class->beep = NULL;
@@ -774,7 +753,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->destroy_notify = NULL;
impl_class->register_dnd = gdk_offscreen_window_do_nothing;
impl_class->drag_begin = NULL;
impl_class->process_updates_recurse = gdk_offscreen_window_process_updates_recurse;
impl_class->sync_rendering = NULL;
impl_class->simulate_key = NULL;
impl_class->simulate_button = NULL;
+166 -397
View File
@@ -131,9 +131,6 @@
* draws over the native child window.
*/
/* This adds a local value to the GdkVisibilityState enum */
#define GDK_VISIBILITY_NOT_VIEWABLE 3
enum {
PICK_EMBEDDED_CHILD, /* only called if children are embedded */
TO_EMBEDDER,
@@ -147,18 +144,8 @@ enum {
PROP_CURSOR
};
struct _GdkWindowPaint
{
cairo_region_t *region;
cairo_surface_t *surface;
};
/* Global info */
static void gdk_window_drop_cairo_surface (GdkWindow *private);
static void gdk_window_free_paint_stack (GdkWindow *window);
static void gdk_window_finalize (GObject *object);
static void gdk_window_set_property (GObject *object,
@@ -170,8 +157,7 @@ static void gdk_window_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gdk_window_clear_backing_region (GdkWindow *window,
cairo_region_t *region);
static void gdk_window_clear_backing_region (GdkWindow *window);
static void recompute_visible_regions (GdkWindow *private,
gboolean recalculate_children);
@@ -250,11 +236,6 @@ gdk_window_init (GdkWindow *window)
window->width = 1;
window->height = 1;
window->toplevel_window_type = -1;
/* starts hidden */
window->effective_visibility = GDK_VISIBILITY_NOT_VIEWABLE;
window->visibility = GDK_VISIBILITY_FULLY_OBSCURED;
/* Default to unobscured since some backends don't send visibility events */
window->native_visibility = GDK_VISIBILITY_UNOBSCURED;
window->device_cursor = g_hash_table_new_full (NULL, NULL,
NULL, g_object_unref);
@@ -477,8 +458,6 @@ gdk_window_finalize (GObject *object)
_gdk_window_destroy (window, TRUE);
}
gdk_window_drop_cairo_surface (window);
if (window->impl)
{
g_object_unref (window->impl);
@@ -743,64 +722,6 @@ remove_child_area (GdkWindow *window,
}
}
static GdkVisibilityState
effective_visibility (GdkWindow *window)
{
GdkVisibilityState native;
if (!gdk_window_is_viewable (window))
return GDK_VISIBILITY_NOT_VIEWABLE;
native = window->impl_window->native_visibility;
if (native == GDK_VISIBILITY_FULLY_OBSCURED ||
window->visibility == GDK_VISIBILITY_FULLY_OBSCURED)
return GDK_VISIBILITY_FULLY_OBSCURED;
else if (native == GDK_VISIBILITY_UNOBSCURED)
return window->visibility;
else /* native PARTIAL, private partial or unobscured */
return GDK_VISIBILITY_PARTIAL;
}
static void
gdk_window_update_visibility (GdkWindow *window)
{
GdkVisibilityState new_visibility;
GdkEvent *event;
new_visibility = effective_visibility (window);
if (new_visibility != window->effective_visibility)
{
window->effective_visibility = new_visibility;
if (new_visibility != GDK_VISIBILITY_NOT_VIEWABLE &&
window->event_mask & GDK_VISIBILITY_NOTIFY_MASK)
{
event = _gdk_make_event (window, GDK_VISIBILITY_NOTIFY,
NULL, FALSE);
event->visibility.state = new_visibility;
}
}
}
static void
gdk_window_update_visibility_recursively (GdkWindow *window,
GdkWindow *only_for_impl)
{
GdkWindow *child;
GList *l;
gdk_window_update_visibility (window);
for (l = window->children; l != NULL; l = l->next)
{
child = l->data;
if ((only_for_impl == NULL) ||
(only_for_impl == child->impl_window))
gdk_window_update_visibility_recursively (child, only_for_impl);
}
}
static gboolean
should_apply_clip_as_shape (GdkWindow *window)
{
@@ -950,42 +871,6 @@ recompute_visible_regions_internal (GdkWindow *private,
private->clip_region = new_clip;
}
if (clip_region_changed)
{
GdkVisibilityState visibility;
gboolean fully_visible;
if (cairo_region_is_empty (private->clip_region))
visibility = GDK_VISIBILITY_FULLY_OBSCURED;
else
{
if (private->shape)
{
fully_visible = cairo_region_equal (private->clip_region,
private->shape);
}
else
{
r.x = 0;
r.y = 0;
r.width = private->width;
r.height = private->height;
fully_visible = region_rect_equal (private->clip_region, &r);
}
if (fully_visible)
visibility = GDK_VISIBILITY_UNOBSCURED;
else
visibility = GDK_VISIBILITY_PARTIAL;
}
if (private->visibility != visibility)
{
private->visibility = visibility;
gdk_window_update_visibility (private);
}
}
/* Update all children, recursively (except for root, where children are not exact). */
if ((abs_pos_changed || clip_region_changed || recalculate_children) &&
private->window_type != GDK_WINDOW_ROOT)
@@ -1002,18 +887,6 @@ recompute_visible_regions_internal (GdkWindow *private,
FALSE);
}
}
if (private->cairo_surface)
{
if (!gdk_window_has_impl (private) ||
!GDK_WINDOW_IMPL_GET_CLASS (private->impl)->resize_cairo_surface (private,
private->cairo_surface,
private->width,
private->height))
{
gdk_window_drop_cairo_surface (private);
}
}
}
/* Call this when private has changed in one or more of these ways:
@@ -1531,10 +1404,6 @@ gdk_window_reparent (GdkWindow *window,
if (is_parent_of (window, new_parent))
return;
/* This might be wrong in the new parent, e.g. for non-native surfaces.
To make sure we're ok, just wipe it. */
gdk_window_drop_cairo_surface (window);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
old_parent = window->parent;
@@ -1716,8 +1585,6 @@ gdk_window_ensure_native (GdkWindow *window)
/* Need to create a native window */
gdk_window_drop_cairo_surface (window);
screen = gdk_window_get_screen (window);
display = gdk_screen_get_display (screen);
parent = window->parent;
@@ -1847,6 +1714,18 @@ window_remove_from_pointer_info (GdkWindow *window,
window);
}
static void
gdk_window_free_current_paint (GdkWindow *window)
{
cairo_surface_destroy (window->current_paint.surface);
window->current_paint.surface = NULL;
cairo_region_destroy (window->current_paint.region);
window->current_paint.region = NULL;
window->current_paint.surface_needs_composite = FALSE;
}
/**
* _gdk_window_destroy_hierarchy:
* @window: a #GdkWindow
@@ -1889,7 +1768,6 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
if (temp_window == window)
g_object_set_qdata (G_OBJECT (screen), quark_pointer_window, NULL);
switch (window->window_type)
{
case GDK_WINDOW_ROOT:
@@ -1952,7 +1830,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
gdk_window_set_frame_clock (window, NULL);
}
gdk_window_free_paint_stack (window);
gdk_window_free_current_paint (window);
if (window->background)
{
@@ -1987,8 +1865,6 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
_gdk_window_clear_update_area (window);
gdk_window_drop_cairo_surface (window);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (gdk_window_has_impl (window))
@@ -2748,8 +2624,6 @@ gdk_window_begin_paint_region (GdkWindow *window,
{
GdkRectangle clip_box;
GdkWindowImplClass *impl_class;
GdkWindowPaint *paint;
GSList *list;
double sx, sy;
gboolean needs_surface;
@@ -2759,43 +2633,46 @@ gdk_window_begin_paint_region (GdkWindow *window,
!gdk_window_has_impl (window))
return;
if (window->current_paint.surface != NULL)
{
g_warning ("gdk_window_begin_paint_region called while a paint was "
"alredy in progress. This is not allowed.");
return;
}
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
needs_surface = TRUE;
if (impl_class->begin_paint_region)
needs_surface = impl_class->begin_paint_region (window, region);
paint = g_new0 (GdkWindowPaint, 1);
paint->region = cairo_region_copy (region);
window->current_paint.region = cairo_region_copy (region);
cairo_region_intersect (paint->region, window->clip_region);
cairo_region_get_extents (paint->region, &clip_box);
cairo_region_intersect (window->current_paint.region, window->clip_region);
cairo_region_get_extents (window->current_paint.region, &clip_box);
if (needs_surface)
{
paint->surface = gdk_window_create_similar_surface (window,
gdk_window_get_content (window),
MAX (clip_box.width, 1),
MAX (clip_box.height, 1));
window->current_paint.surface = gdk_window_create_similar_surface (window,
gdk_window_get_content (window),
MAX (clip_box.width, 1),
MAX (clip_box.height, 1));
sx = sy = 1;
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_get_device_scale (paint->surface, &sx, &sy);
cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
#endif
cairo_surface_set_device_offset (paint->surface, -clip_box.x*sx, -clip_box.y*sy);
}
cairo_surface_set_device_offset (window->current_paint.surface, -clip_box.x*sx, -clip_box.y*sy);
for (list = window->paint_stack; list != NULL; list = list->next)
window->current_paint.surface_needs_composite = TRUE;
}
else
{
GdkWindowPaint *tmp_paint = list->data;
cairo_region_subtract (tmp_paint->region, paint->region);
window->current_paint.surface = gdk_window_ref_impl_surface (window);
window->current_paint.surface_needs_composite = FALSE;
}
window->paint_stack = g_slist_prepend (window->paint_stack, paint);
if (!cairo_region_is_empty (paint->region))
gdk_window_clear_backing_region (window,
paint->region);
if (!cairo_region_is_empty (window->current_paint.region))
gdk_window_clear_backing_region (window);
}
/**
@@ -2815,7 +2692,6 @@ void
gdk_window_end_paint (GdkWindow *window)
{
GdkWindow *composited;
GdkWindowPaint *paint;
GdkWindowImplClass *impl_class;
GdkRectangle clip_box = { 0, };
cairo_region_t *full_clip;
@@ -2827,7 +2703,7 @@ gdk_window_end_paint (GdkWindow *window)
!gdk_window_has_impl (window))
return;
if (window->paint_stack == NULL)
if (window->current_paint.surface == NULL)
{
g_warning (G_STRLOC": no preceding call to gdk_window_begin_paint_region(), see documentation");
return;
@@ -2838,42 +2714,44 @@ gdk_window_end_paint (GdkWindow *window)
if (impl_class->end_paint)
impl_class->end_paint (window);
paint = window->paint_stack->data;
window->paint_stack = g_slist_delete_link (window->paint_stack,
window->paint_stack);
if (paint->surface != NULL)
if (window->current_paint.surface_needs_composite)
{
cairo_region_get_extents (paint->region, &clip_box);
full_clip = cairo_region_copy (window->clip_region);
cairo_region_intersect (full_clip, paint->region);
cairo_surface_t *surface;
gboolean skip_alpha_blending;
cr = gdk_cairo_create (window);
cairo_set_source_surface (cr, paint->surface, 0, 0);
cairo_region_get_extents (window->current_paint.region, &clip_box);
full_clip = cairo_region_copy (window->clip_region);
cairo_region_intersect (full_clip, window->current_paint.region);
surface = gdk_window_ref_impl_surface (window);
cr = cairo_create (surface);
cairo_surface_destroy (surface);
cairo_set_source_surface (cr, window->current_paint.surface, 0, 0);
gdk_cairo_region (cr, full_clip);
cairo_clip (cr);
if (gdk_window_has_impl (window) ||
window->alpha == 255)
{
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
}
/* We can skip alpha blending for a fast composite case
* if we have an impl window or we're a fully opaque window. */
skip_alpha_blending = (gdk_window_has_impl (window) ||
window->alpha == 255);
if (skip_alpha_blending)
{
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
}
else
{
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, window->alpha / 255.0);
}
{
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, window->alpha / 255.0);
}
cairo_destroy (cr);
cairo_region_destroy (full_clip);
cairo_surface_destroy (paint->surface);
}
cairo_region_destroy (paint->region);
g_free (paint);
gdk_window_free_current_paint (window);
/* find a composited window in our hierarchy to signal its
* parent to redraw, calculating the clip box as we go...
@@ -2899,51 +2777,15 @@ gdk_window_end_paint (GdkWindow *window)
}
}
static void
gdk_window_free_paint_stack (GdkWindow *window)
{
if (window->paint_stack)
{
GSList *tmp_list = window->paint_stack;
while (tmp_list)
{
GdkWindowPaint *paint = tmp_list->data;
if (tmp_list == window->paint_stack &&
paint->surface != NULL)
cairo_surface_destroy (paint->surface);
cairo_region_destroy (paint->region);
g_free (paint);
tmp_list = tmp_list->next;
}
g_slist_free (window->paint_stack);
window->paint_stack = NULL;
}
}
/**
* gdk_window_flush:
* @window: a #GdkWindow
*
* Flush all outstanding cached operations on a window, leaving the
* window in a state which reflects all that has been drawn before.
*
* Gdk uses multiple kinds of caching to get better performance and
* nicer drawing. For instance, during exposes all paints to a window
* using double buffered rendering are keep on a surface until the last
* window has been exposed.
*
* Normally this should be completely invisible to applications, as
* we automatically flush the windows when required, but this might
* be needed if you for instance mix direct native drawing with
* gdk drawing. For Gtk widgets that dont use double buffering this
* will be called automatically before sending the expose event.
* This function does nothing.
*
* Since: 2.18
*
* Deprecated: 3.14
**/
void
gdk_window_flush (GdkWindow *window)
@@ -2972,23 +2814,8 @@ gdk_window_get_clip_region (GdkWindow *window)
result = cairo_region_copy (window->clip_region);
if (window->paint_stack)
{
cairo_region_t *paint_region = cairo_region_create ();
GSList *tmp_list = window->paint_stack;
while (tmp_list)
{
GdkWindowPaint *paint = tmp_list->data;
cairo_region_union (paint_region, paint->region);
tmp_list = tmp_list->next;
}
cairo_region_intersect (result, paint_region);
cairo_region_destroy (paint_region);
}
if (window->current_paint.region != NULL)
cairo_region_intersect (result, window->current_paint.region);
return result;
}
@@ -3014,20 +2841,17 @@ gdk_window_get_visible_region (GdkWindow *window)
}
static void
gdk_window_clear_backing_region (GdkWindow *window,
cairo_region_t *region)
gdk_window_clear_backing_region (GdkWindow *window)
{
GdkWindowPaint *paint = window->paint_stack->data;
cairo_region_t *clip;
GdkWindow *bg_window;
cairo_pattern_t *pattern = NULL;
int x_offset = 0, y_offset = 0;
cairo_t *cr;
if (GDK_WINDOW_DESTROYED (window) || paint->surface == NULL)
if (GDK_WINDOW_DESTROYED (window))
return;
cr = cairo_create (paint->surface);
cr = cairo_create (window->current_paint.surface);
for (bg_window = window; bg_window; bg_window = bg_window->parent)
{
@@ -3048,99 +2872,51 @@ gdk_window_clear_backing_region (GdkWindow *window,
else
cairo_set_source_rgb (cr, 0, 0, 0);
clip = cairo_region_copy (paint->region);
cairo_region_intersect (clip, region);
gdk_cairo_region (cr, clip);
gdk_cairo_region (cr, window->current_paint.region);
cairo_fill (cr);
cairo_destroy (cr);
cairo_region_destroy (clip);
}
static void
gdk_window_drop_cairo_surface (GdkWindow *window)
{
if (window->cairo_surface)
{
cairo_surface_finish (window->cairo_surface);
cairo_surface_set_user_data (window->cairo_surface, &gdk_window_cairo_key,
NULL, NULL);
window->cairo_surface = NULL;
}
}
static void
gdk_window_cairo_surface_destroy (void *data)
{
GdkWindow *window = data;
window->cairo_surface = NULL;
}
/* This returns either the current working surface on the paint stack
* or the actual impl surface of the window. This should not be used
* from very many places: be careful! */
static cairo_surface_t *
gdk_window_create_cairo_surface (GdkWindow *window,
int width,
int height)
ref_window_surface (GdkWindow *window)
{
cairo_surface_t *surface, *subsurface;
surface = gdk_window_ref_impl_surface (window);
if (gdk_window_has_impl (window))
return surface;
subsurface = cairo_surface_create_for_rectangle (surface,
window->abs_x,
window->abs_y,
width,
height);
cairo_surface_destroy (surface);
return subsurface;
if (window->impl_window->current_paint.surface)
return cairo_surface_reference (window->impl_window->current_paint.surface);
else
return gdk_window_ref_impl_surface (window);
}
/* This is used in places like gdk_cairo_set_source_window and
* other places to take "screenshots" of windows. Thus, we allow
* it to be used outside of a begin_paint / end_paint. */
cairo_surface_t *
_gdk_window_ref_cairo_surface (GdkWindow *window)
{
cairo_surface_t *surface;
GdkWindowPaint *paint;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
paint = NULL;
if (window->impl_window->paint_stack)
paint = window->impl_window->paint_stack->data;
surface = ref_window_surface (window);
if (paint && paint->surface != NULL)
if (gdk_window_has_impl (window))
{
surface = cairo_surface_create_for_rectangle (paint->surface,
window->abs_x,
window->abs_y,
window->width,
window->height);
return surface;
}
else
{
if (!window->cairo_surface)
{
window->cairo_surface = gdk_window_create_cairo_surface (window,
window->width,
window->height);
if (window->cairo_surface)
{
cairo_surface_set_user_data (window->cairo_surface, &gdk_window_cairo_key,
window, gdk_window_cairo_surface_destroy);
}
}
else
cairo_surface_reference (window->cairo_surface);
surface = window->cairo_surface;
cairo_surface_t *subsurface;
subsurface = cairo_surface_create_for_rectangle (surface,
window->abs_x,
window->abs_y,
window->width,
window->height);
cairo_surface_destroy (surface);
return subsurface;
}
return surface;
}
/**
@@ -3160,28 +2936,24 @@ _gdk_window_ref_cairo_surface (GdkWindow *window)
cairo_t *
gdk_cairo_create (GdkWindow *window)
{
GdkWindowPaint *paint;
cairo_surface_t *surface;
cairo_region_t *region;
cairo_surface_t *surface;
cairo_t *cr;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
surface = _gdk_window_ref_cairo_surface (window);
cr = cairo_create (surface);
if (window->impl_window->paint_stack)
{
paint = window->impl_window->paint_stack->data;
region = cairo_region_copy (paint->region);
cairo_region_translate (region, -window->abs_x, -window->abs_y);
gdk_cairo_region (cr, region);
cairo_region_destroy (region);
}
if (window->impl_window->current_paint.region != NULL)
region = cairo_region_copy (window->impl_window->current_paint.region);
else
gdk_cairo_region (cr, window->clip_region);
region = cairo_region_copy (window->clip_region);
cairo_region_translate (region, -window->abs_x, -window->abs_y);
gdk_cairo_region (cr, region);
cairo_region_destroy (region);
cairo_clip (cr);
cairo_surface_destroy (surface);
@@ -3335,47 +3107,72 @@ gdk_window_schedule_update (GdkWindow *window)
GDK_FRAME_CLOCK_PHASE_PAINT);
}
static void
gdk_window_add_damage (GdkWindow *toplevel,
cairo_region_t *damaged_region)
{
GdkDisplay *display;
GdkEvent event = { 0, };
/* This function only makes sense for offscreen windows. */
g_assert (gdk_window_is_offscreen (toplevel));
event.expose.type = GDK_DAMAGE;
event.expose.window = toplevel;
event.expose.send_event = FALSE;
event.expose.region = damaged_region;
cairo_region_get_extents (event.expose.region, &event.expose.area);
display = gdk_window_get_display (event.expose.window);
_gdk_event_queue_append (display, gdk_event_copy (&event));
}
static void
_gdk_window_process_updates_recurse_helper (GdkWindow *window,
cairo_region_t *expose_region,
int dx, int dy)
cairo_region_t *expose_region)
{
GdkWindow *child;
cairo_region_t *clipped_expose_region;
GdkRectangle clip_box;
GList *l, *children;
gboolean send_expose_event;
clipped_expose_region = cairo_region_copy (expose_region);
cairo_region_translate (clipped_expose_region, dx, dy);
cairo_region_intersect (clipped_expose_region, window->clip_region);
if (window->destroyed)
return;
if (cairo_region_is_empty (clipped_expose_region) || window->destroyed)
goto out;
if (gdk_window_is_offscreen (window->impl_window) &&
gdk_window_has_impl (window))
_gdk_window_add_damage ((GdkWindow *) window->impl_window, clipped_expose_region);
if (window->alpha != 255 && !gdk_window_has_impl (window))
{
if (window->alpha == 0)
goto out;
cairo_region_get_extents (clipped_expose_region, &clip_box);
clip_box.x += window->abs_x;
clip_box.y += window->abs_y;
/* TODO: How do we now do subwindow alphas */
}
/* Paint the window before the children, clipped to the window region */
if (window->alpha == 0 && !gdk_window_has_impl (window))
return;
/* While gtk+ no longer handles exposes on anything but native
window we still have to send them to all windows that have the
event mask set for backwards compat. We also need to send
it to all native windows, even if they don't specify the
expose mask, because they may have non-native children that do. */
if (gdk_window_has_impl (window) ||
window->event_mask & GDK_EXPOSURE_MASK)
send_expose_event = (gdk_window_has_impl (window) ||
window->event_mask & GDK_EXPOSURE_MASK);
/* If we have no children, we aren't an offscreen window, and we aren't going
* to send an expose event, so fizzle out now. */
if (window->children == NULL &&
!gdk_window_is_offscreen (window) &&
!send_expose_event)
return;
clipped_expose_region = cairo_region_copy (expose_region);
if (!gdk_window_has_impl (window))
cairo_region_translate (clipped_expose_region, -window->x, -window->y);
cairo_region_intersect (clipped_expose_region, window->clip_region);
if (cairo_region_is_empty (clipped_expose_region))
goto out;
if (gdk_window_is_offscreen (window))
gdk_window_add_damage (window, clipped_expose_region);
/* Paint the window before the children, clipped to the window region */
if (send_expose_event)
{
GdkEvent event;
@@ -3410,7 +3207,7 @@ _gdk_window_process_updates_recurse_helper (GdkWindow *window,
/* Client side child, expose */
if (child->impl == window->impl)
_gdk_window_process_updates_recurse_helper ((GdkWindow *)child, clipped_expose_region, -child->x, -child->y);
_gdk_window_process_updates_recurse_helper ((GdkWindow *)child, clipped_expose_region);
}
g_list_free_full (children, g_object_unref);
@@ -3423,7 +3220,7 @@ void
_gdk_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *expose_region)
{
_gdk_window_process_updates_recurse_helper (window, expose_region, 0, 0);
_gdk_window_process_updates_recurse_helper (window, expose_region);
}
@@ -3451,8 +3248,6 @@ static void
gdk_window_process_updates_internal (GdkWindow *window)
{
GdkWindowImplClass *impl_class;
gboolean save_region = FALSE;
GdkRectangle clip_box;
GdkWindow *toplevel;
toplevel = gdk_window_get_toplevel (window);
@@ -3490,15 +3285,17 @@ gdk_window_process_updates_internal (GdkWindow *window)
g_usleep (70000);
}
cairo_region_get_extents (update_area, &clip_box);
expose_region = cairo_region_copy (update_area);
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
save_region = impl_class->queue_antiexpose (window, update_area);
if (impl_class->queue_antiexpose)
impl_class->queue_antiexpose (window, update_area);
expose_region = cairo_region_copy (update_area);
impl_class->process_updates_recurse (window, expose_region);
cairo_region_destroy (expose_region);
}
if (!save_region)
cairo_region_destroy (update_area);
cairo_region_destroy (update_area);
}
window->in_update = FALSE;
@@ -4761,9 +4558,6 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
{
recompute_visible_regions (window, FALSE);
/* If any decendants became visible we need to send visibility notify */
gdk_window_update_visibility_recursively (window, NULL);
if (gdk_window_is_viewable (window))
{
_gdk_synthesize_crossing_events_for_geometry_change (window);
@@ -5141,9 +4935,6 @@ gdk_window_hide (GdkWindow *window)
recompute_visible_regions (window, FALSE);
/* all decendants became non-visible, we need to send visibility notify */
gdk_window_update_visibility_recursively (window, NULL);
if (was_mapped && !gdk_window_has_impl (window))
{
if (window->event_mask & GDK_STRUCTURE_MASK)
@@ -6790,21 +6581,6 @@ gdk_window_is_shaped (GdkWindow *window)
return window->shaped;
}
void
_gdk_window_add_damage (GdkWindow *toplevel,
cairo_region_t *damaged_region)
{
GdkDisplay *display;
GdkEvent event = { 0, };
event.expose.type = GDK_DAMAGE;
event.expose.window = toplevel;
event.expose.send_event = FALSE;
event.expose.region = damaged_region;
cairo_region_get_extents (event.expose.region, &event.expose.area);
display = gdk_window_get_display (event.expose.window);
_gdk_event_queue_append (display, gdk_event_copy (&event));
}
/* Gets the toplevel for a window as used for events,
i.e. including offscreen parents */
static GdkWindow *
@@ -9060,13 +8836,6 @@ _gdk_windowing_got_event (GdkDisplay *display,
}
#endif
if (event->type == GDK_VISIBILITY_NOTIFY)
{
event_window->native_visibility = event->visibility.state;
gdk_window_update_visibility_recursively (event_window, event_window);
goto out;
}
if (!(is_button_type (event->type) ||
is_motion_type (event->type)) ||
event_window->window_type == GDK_WINDOW_ROOT)
+1 -1
View File
@@ -740,7 +740,7 @@ void gdk_window_begin_paint_region (GdkWindow *window,
const cairo_region_t *region);
GDK_AVAILABLE_IN_ALL
void gdk_window_end_paint (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gdk_window_flush (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
+8
View File
@@ -39,10 +39,18 @@ gdk_window_impl_beep (GdkWindow *window)
return FALSE;
}
static void
gdk_window_impl_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
_gdk_window_process_updates_recurse (window, region);
}
static void
gdk_window_impl_class_init (GdkWindowImplClass *impl_class)
{
impl_class->beep = gdk_window_impl_beep;
impl_class->process_updates_recurse = gdk_window_impl_process_updates_recurse;
}
static void
+3 -14
View File
@@ -126,12 +126,10 @@ struct _GdkWindowImplClass
/* Called before processing updates for a window. This gives the windowing
* layer a chance to save the region for later use in avoiding duplicate
* exposes. The return value indicates whether the function has a saved
* the region; if the result is TRUE, then the windowing layer is responsible
* for destroying the region later.
* exposes.
*/
gboolean (* queue_antiexpose) (GdkWindow *window,
cairo_region_t *update_area);
void (* queue_antiexpose) (GdkWindow *window,
cairo_region_t *update_area);
/* Called to do the windowing system specific part of gdk_window_destroy(),
*
@@ -158,15 +156,6 @@ struct _GdkWindowImplClass
*/
void (*destroy_foreign) (GdkWindow *window);
/* Resizes @surface to a new size. If successful, return %TRUE.
* If the backend cannot resize surfaces, return %FALSE and a new
* surface will be created instead.
*/
gboolean (* resize_cairo_surface) (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height);
/* optional */
gboolean (* beep) (GdkWindow *window);
+3 -63
View File
@@ -137,37 +137,6 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
CGContextSaveGState (cg_context);
CGContextSetAllowsAntialiasing (cg_context, antialias);
/* We'll emulate the clipping caused by double buffering here */
if (window_impl->begin_paint_count != 0)
{
CGRect rect;
CGRect *cg_rects;
gint n_rects, i;
n_rects = cairo_region_num_rectangles (window_impl->paint_clip_region);
if (n_rects == 1)
cg_rects = &rect;
else
cg_rects = g_new (CGRect, n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_rectangle_int_t cairo_rect;
cairo_region_get_rectangle (window_impl->paint_clip_region,
i, &cairo_rect);
cg_rects[i].origin.x = cairo_rect.x;
cg_rects[i].origin.y = cairo_rect.y;
cg_rects[i].size.width = cairo_rect.width;
cg_rects[i].size.height = cairo_rect.height;
}
CGContextClipToRects (cg_context, cg_rects, n_rects);
if (cg_rects != &rect)
g_free (cg_rects);
}
return cg_context;
}
@@ -379,12 +348,7 @@ gdk_window_impl_quartz_begin_paint_region (GdkWindow *window,
cairo_region_translate (clipped_and_offset_region,
window->abs_x, window->abs_y);
if (impl->begin_paint_count == 0)
impl->paint_clip_region = cairo_region_reference (clipped_and_offset_region);
else
cairo_region_union (impl->paint_clip_region, clipped_and_offset_region);
impl->begin_paint_count++;
impl->paint_clip_region = cairo_region_reference (clipped_and_offset_region);
if (cairo_region_is_empty (clipped_and_offset_region))
goto done;
@@ -423,13 +387,8 @@ gdk_window_impl_quartz_end_paint (GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
impl->begin_paint_count--;
if (impl->begin_paint_count == 0)
{
cairo_region_destroy (impl->paint_clip_region);
impl->paint_clip_region = NULL;
}
cairo_region_destroy (impl->paint_clip_region);
impl->paint_clip_region = NULL;
}
static void
@@ -1104,16 +1063,6 @@ gdk_quartz_window_destroy (GdkWindow *window,
}
}
static gboolean
gdk_window_quartz_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
/* Quartz surfaces cannot be resized */
return FALSE;
}
static void
gdk_quartz_window_destroy_foreign (GdkWindow *window)
{
@@ -2108,13 +2057,6 @@ gdk_window_quartz_set_static_gravities (GdkWindow *window,
return FALSE;
}
static gboolean
gdk_quartz_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
return FALSE;
}
static void
gdk_quartz_window_set_focus_on_map (GdkWindow *window,
gboolean focus_on_map)
@@ -2946,10 +2888,8 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
impl_class->shape_combine_region = gdk_window_quartz_shape_combine_region;
impl_class->input_shape_combine_region = gdk_window_quartz_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_quartz_set_static_gravities;
impl_class->queue_antiexpose = gdk_quartz_window_queue_antiexpose;
impl_class->destroy = gdk_quartz_window_destroy;
impl_class->destroy_foreign = gdk_quartz_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_quartz_resize_cairo_surface;
impl_class->get_shape = gdk_quartz_window_get_shape;
impl_class->get_input_shape = gdk_quartz_window_get_input_shape;
impl_class->begin_paint_region = gdk_window_impl_quartz_begin_paint_region;
-1
View File
@@ -51,7 +51,6 @@ struct _GdkWindowImplQuartz
GdkWindowTypeHint type_hint;
cairo_region_t *paint_clip_region;
gint begin_paint_count;
gint in_paint_rect_count;
GdkWindow *transient_for;
+7
View File
@@ -889,3 +889,10 @@ _gdk_wayland_shm_surface_get_busy (cairo_surface_t *surface)
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
return data->busy;
}
void
_gdk_wayland_shm_surface_clear (cairo_surface_t *surface)
{
GdkWaylandCairoSurfaceData *data = cairo_surface_get_user_data (surface, &gdk_wayland_cairo_key);
memset (data->buf, 0, data->buf_length);
}
+1
View File
@@ -185,5 +185,6 @@ cairo_surface_t * _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *di
struct wl_buffer *_gdk_wayland_shm_surface_get_wl_buffer (cairo_surface_t *surface);
void _gdk_wayland_shm_surface_set_busy (cairo_surface_t *surface);
gboolean _gdk_wayland_shm_surface_get_busy (cairo_surface_t *surface);
void _gdk_wayland_shm_surface_clear (cairo_surface_t *surface);
#endif /* __GDK_PRIVATE_WAYLAND_H__ */
+55 -76
View File
@@ -327,7 +327,7 @@ frame_callback (void *data,
#endif
}
static const struct wl_callback_listener listener = {
static const struct wl_callback_listener frame_listener = {
frame_callback
};
@@ -375,7 +375,7 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
impl->pending_frame_counter = gdk_frame_clock_get_frame_counter (clock);
callback = wl_surface_frame (impl->surface);
wl_callback_add_listener (callback, &listener, window);
wl_callback_add_listener (callback, &frame_listener, window);
_gdk_frame_clock_freeze (clock);
wl_surface_commit (impl->surface);
@@ -568,7 +568,42 @@ gdk_window_impl_wayland_begin_paint_region (GdkWindow *window,
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
gdk_wayland_window_ensure_cairo_surface (window);
return _gdk_wayland_shm_surface_get_busy (impl->cairo_surface);
if (_gdk_wayland_shm_surface_get_busy (impl->cairo_surface))
{
/* The surface is busy, so create a temporary surface which we paint
* to and hope that by the time we're done painting the surface isn't
* busy any more. */
return TRUE;
}
else
{
/* Returning FALSE from begin_paint_region says to use the native
* backing surface, which is our SHM surface. We need to make sure
* to clear it before the code tries to paint to it to prevent
* artifacts from the last paint. */
_gdk_wayland_shm_surface_clear (impl->cairo_surface);
return FALSE;
}
}
static void
gdk_window_impl_wayland_end_paint (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
cairo_rectangle_int_t rect;
int i, n;
gdk_wayland_window_attach_image (window);
n = cairo_region_num_rectangles (window->current_paint.region);
for (i = 0; i < n; i++)
{
cairo_region_get_rectangle (window->current_paint.region, i, &rect);
wl_surface_damage (impl->surface,
rect.x, rect.y, rect.width, rect.height);
impl->pending_commit = TRUE;
}
}
static void
@@ -596,13 +631,11 @@ gdk_wayland_window_configure (GdkWindow *window,
GdkDisplay *display;
GdkEvent *event;
display = gdk_window_get_display (window);
if (window->width == width && window->height == height)
return;
/* TODO: Only generate a configure event if width/height/scale have actually
* changed?
*/
event = gdk_event_new (GDK_CONFIGURE);
event->configure.window = window;
event->configure.window = g_object_ref (window);
event->configure.send_event = FALSE;
event->configure.width = width;
event->configure.height = height;
@@ -610,8 +643,7 @@ gdk_wayland_window_configure (GdkWindow *window,
gdk_wayland_window_update_size (window, width, height);
_gdk_window_update_size (window);
g_object_ref(window);
display = gdk_window_get_display (window);
_gdk_wayland_display_deliver_event (display, event);
}
@@ -833,13 +865,11 @@ xdg_surface_close (void *data,
GdkDisplay *display;
GdkEvent *event;
display = gdk_window_get_display (window);
event = gdk_event_new (GDK_DELETE);
event->any.window = window;
event->any.window = g_object_ref (window);
event->any.send_event = TRUE;
display = gdk_window_get_display (window);
_gdk_wayland_display_deliver_event (display, event);
}
@@ -1073,27 +1103,12 @@ gdk_wayland_window_show (GdkWindow *window,
}
static void
gdk_wayland_window_hide_surface (GdkWindow *window,
gboolean is_destroy)
gdk_wayland_window_hide_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (impl->surface)
{
if (!is_destroy)
{
wl_surface_attach (impl->surface, NULL, 0, 0);
wl_surface_commit (impl->surface);
}
else
{
wl_surface_destroy (impl->surface);
impl->surface = NULL;
g_slist_free (impl->outputs);
impl->outputs = NULL;
}
if (impl->xdg_surface)
{
xdg_surface_destroy (impl->xdg_surface);
@@ -1104,6 +1119,12 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
xdg_popup_destroy (impl->xdg_popup);
impl->xdg_popup = NULL;
}
wl_surface_destroy (impl->surface);
impl->surface = NULL;
g_slist_free (impl->outputs);
impl->outputs = NULL;
}
impl->mapped = FALSE;
@@ -1112,7 +1133,7 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
static void
gdk_wayland_window_hide (GdkWindow *window)
{
gdk_wayland_window_hide_surface (window, FALSE);
gdk_wayland_window_hide_surface (window);
_gdk_window_clear_update_area (window);
}
@@ -1126,7 +1147,7 @@ gdk_window_wayland_withdraw (GdkWindow *window)
g_assert (!GDK_WINDOW_IS_MAPPED (window));
gdk_wayland_window_hide_surface (window, FALSE);
gdk_wayland_window_hide_surface (window);
}
}
@@ -1314,13 +1335,6 @@ gdk_window_wayland_set_static_gravities (GdkWindow *window,
return TRUE;
}
static gboolean
gdk_wayland_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
return FALSE;
}
static void
gdk_wayland_window_destroy (GdkWindow *window,
gboolean recursing,
@@ -1337,7 +1351,7 @@ gdk_wayland_window_destroy (GdkWindow *window,
*/
g_return_if_fail (!foreign_destroy);
gdk_wayland_window_hide_surface (window, TRUE);
gdk_wayland_window_hide_surface (window);
if (impl->cairo_surface)
cairo_surface_finish (impl->cairo_surface);
@@ -1348,16 +1362,6 @@ gdk_window_wayland_destroy_foreign (GdkWindow *window)
{
}
static gboolean
gdk_window_wayland_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
/* cairo image surfaces cannot be resized */
return FALSE;
}
static cairo_region_t *
gdk_wayland_window_get_shape (GdkWindow *window)
{
@@ -1800,29 +1804,6 @@ gdk_wayland_window_destroy_notify (GdkWindow *window)
g_object_unref (window);
}
static void
gdk_wayland_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
cairo_rectangle_int_t rect;
int i, n;
gdk_wayland_window_ensure_cairo_surface (window);
gdk_wayland_window_attach_image (window);
_gdk_window_process_updates_recurse (window, region);
n = cairo_region_num_rectangles (region);
for (i = 0; i < n; i++)
{
cairo_region_get_rectangle (region, i, &rect);
wl_surface_damage (impl->surface,
rect.x, rect.y, rect.width, rect.height);
impl->pending_commit = TRUE;
}
}
static void
gdk_wayland_window_sync_rendering (GdkWindow *window)
{
@@ -1989,13 +1970,12 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
impl_class->shape_combine_region = gdk_window_wayland_shape_combine_region;
impl_class->input_shape_combine_region = gdk_window_wayland_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_wayland_set_static_gravities;
impl_class->queue_antiexpose = gdk_wayland_window_queue_antiexpose;
impl_class->destroy = gdk_wayland_window_destroy;
impl_class->destroy_foreign = gdk_window_wayland_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_wayland_resize_cairo_surface;
impl_class->get_shape = gdk_wayland_window_get_shape;
impl_class->get_input_shape = gdk_wayland_window_get_input_shape;
impl_class->begin_paint_region = gdk_window_impl_wayland_begin_paint_region;
impl_class->end_paint = gdk_window_impl_wayland_end_paint;
/* impl_class->beep */
impl_class->focus = gdk_wayland_window_focus;
@@ -2039,7 +2019,6 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
impl_class->get_drag_protocol = _gdk_wayland_window_get_drag_protocol;
impl_class->register_dnd = _gdk_wayland_window_register_dnd;
impl_class->drag_begin = _gdk_wayland_window_drag_begin;
impl_class->process_updates_recurse = gdk_wayland_window_process_updates_recurse;
impl_class->sync_rendering = gdk_wayland_window_sync_rendering;
impl_class->simulate_key = gdk_wayland_window_simulate_key;
impl_class->simulate_button = gdk_wayland_window_simulate_button;
+2 -41
View File
@@ -92,11 +92,6 @@
static gboolean gdk_event_translate (MSG *msg,
gint *ret_valp);
static void handle_wm_paint (MSG *msg,
GdkWindow *window,
gboolean return_exposes,
GdkEvent **event);
static gboolean gdk_event_prepare (GSource *source,
gint *timeout);
static gboolean gdk_event_check (GSource *source);
@@ -1517,9 +1512,7 @@ adjust_drag (LONG *drag,
static void
handle_wm_paint (MSG *msg,
GdkWindow *window,
gboolean return_exposes,
GdkEvent **event)
GdkWindow *window)
{
HRGN hrgn = CreateRectRgn (0, 0, 0, 0);
HDC hdc;
@@ -1551,38 +1544,6 @@ handle_wm_paint (MSG *msg,
return;
}
if (return_exposes)
{
if (!GDK_WINDOW_DESTROYED (window))
{
GList *list = _gdk_display->queued_events;
*event = gdk_event_new (GDK_EXPOSE);
(*event)->expose.window = window;
(*event)->expose.area.x = paintstruct.rcPaint.left;
(*event)->expose.area.y = paintstruct.rcPaint.top;
(*event)->expose.area.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
(*event)->expose.area.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
(*event)->expose.region = _gdk_win32_hrgn_to_region (hrgn);
(*event)->expose.count = 0;
while (list != NULL)
{
GdkEventPrivate *evp = list->data;
if (evp->event.any.type == GDK_EXPOSE &&
evp->event.any.window == window &&
!(evp->flags & GDK_EVENT_PENDING))
evp->event.expose.count++;
list = list->next;
}
}
DeleteObject (hrgn);
return;
}
update_region = _gdk_win32_hrgn_to_region (hrgn);
if (!cairo_region_is_empty (update_region))
_gdk_window_invalidate_for_expose (window, update_region);
@@ -2613,7 +2574,7 @@ gdk_event_translate (MSG *msg,
break;
case WM_PAINT:
handle_wm_paint (msg, window, FALSE, NULL);
handle_wm_paint (msg, window);
break;
case WM_SETCURSOR:
+1 -5
View File
@@ -352,11 +352,7 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
* XXX : if these values get changed through the Windoze UI the
* respective gdk_events are not generated yet.
*/
if (strcmp ("gtk-theme-name", name) == 0)
{
g_value_set_string (value, "ms-windows");
}
else if (strcmp ("gtk-double-click-time", name) == 0)
if (strcmp ("gtk-double-click-time", name) == 0)
{
gint i = GetDoubleClickTime ();
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : %d\n", name, i));
-37
View File
@@ -796,16 +796,6 @@ gdk_win32_window_destroy (GdkWindow *window,
}
}
static gboolean
gdk_win32_window_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
/* XXX: Make Cairo surface use DC clip */
return FALSE;
}
static void
gdk_win32_window_destroy_foreign (GdkWindow *window)
{
@@ -3248,23 +3238,6 @@ gdk_win32_window_get_shape (GdkWindow *window)
return NULL;
}
static gboolean
_gdk_win32_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
HRGN hrgn = cairo_region_to_hrgn (area, 0, 0);
GDK_NOTE (EVENTS, g_print ("_gdk_windowing_window_queue_antiexpose: ValidateRgn %p %s\n",
GDK_WINDOW_HWND (window),
_gdk_win32_cairo_region_to_string (area)));
ValidateRgn (GDK_WINDOW_HWND (window), hrgn);
DeleteObject (hrgn);
return FALSE;
}
static void
gdk_win32_input_shape_combine_region (GdkWindow *window,
const cairo_region_t *shape_region,
@@ -3277,13 +3250,6 @@ gdk_win32_input_shape_combine_region (GdkWindow *window,
gdk_win32_window_shape_combine_region (window, shape_region, offset_x, offset_y);
}
static void
gdk_win32_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
_gdk_window_process_updates_recurse (window, region);
}
gboolean
gdk_win32_window_is_win32 (GdkWindow *window)
{
@@ -3430,10 +3396,8 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
impl_class->shape_combine_region = gdk_win32_window_shape_combine_region;
impl_class->input_shape_combine_region = gdk_win32_input_shape_combine_region;
impl_class->set_static_gravities = gdk_win32_window_set_static_gravities;
impl_class->queue_antiexpose = _gdk_win32_window_queue_antiexpose;
impl_class->destroy = gdk_win32_window_destroy;
impl_class->destroy_foreign = gdk_win32_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_win32_window_resize_cairo_surface;
impl_class->get_shape = gdk_win32_window_get_shape;
//FIXME?: impl_class->get_input_shape = gdk_win32_window_get_input_shape;
@@ -3481,7 +3445,6 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
impl_class->get_drag_protocol = _gdk_win32_window_get_drag_protocol;
impl_class->register_dnd = _gdk_win32_window_register_dnd;
impl_class->drag_begin = _gdk_win32_window_drag_begin;
impl_class->process_updates_recurse = gdk_win32_window_process_updates_recurse;
//? impl_class->sync_rendering = _gdk_win32_window_sync_rendering;
impl_class->simulate_key = _gdk_win32_window_simulate_key;
impl_class->simulate_button = _gdk_win32_window_simulate_button;
+2 -4
View File
@@ -212,16 +212,14 @@ gdk_window_queue (GdkWindow *window,
g_queue_push_tail (display_x11->translate_queue, item);
}
gboolean
void
_gdk_x11_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
item->antiexpose_area = area;
item->antiexpose_area = cairo_region_reference (area);
gdk_window_queue (window, item);
return TRUE;
}
void
+1 -1
View File
@@ -126,7 +126,7 @@ void _gdk_x11_window_change_property (GdkWindow *window,
void _gdk_x11_window_delete_property (GdkWindow *window,
GdkAtom property);
gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
void _gdk_x11_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area);
void _gdk_x11_window_translate (GdkWindow *window,
cairo_region_t *area,
-20
View File
@@ -1337,17 +1337,6 @@ gdk_x11_window_destroy (GdkWindow *window,
XDestroyWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
}
static gboolean
gdk_window_x11_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
cairo_xlib_surface_set_size (surface, width, height);
return TRUE;
}
static void
gdk_x11_window_destroy_foreign (GdkWindow *window)
{
@@ -5502,13 +5491,6 @@ gdk_x11_window_set_composited (GdkWindow *window,
#endif
}
static void
gdk_x11_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
_gdk_window_process_updates_recurse (window, region);
}
void
_gdk_x11_display_before_process_all_updates (GdkDisplay *display)
{
@@ -5780,7 +5762,6 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
impl_class->destroy = gdk_x11_window_destroy;
impl_class->destroy_foreign = gdk_x11_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_x11_resize_cairo_surface;
impl_class->get_shape = gdk_x11_window_get_shape;
impl_class->get_input_shape = gdk_x11_window_get_input_shape;
impl_class->beep = gdk_x11_window_beep;
@@ -5828,7 +5809,6 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->get_drag_protocol = gdk_x11_window_get_drag_protocol;
impl_class->register_dnd = _gdk_x11_window_register_dnd;
impl_class->drag_begin = _gdk_x11_window_drag_begin;
impl_class->process_updates_recurse = gdk_x11_window_process_updates_recurse;
impl_class->sync_rendering = _gdk_x11_window_sync_rendering;
impl_class->simulate_key = _gdk_x11_window_simulate_key;
impl_class->simulate_button = _gdk_x11_window_simulate_button;
+36 -12
View File
@@ -45,7 +45,7 @@
# build dir.
#
# This file knows how to handle autoconf, automake, libtool, gtk-doc,
# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu.
# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata.
#
# This makefile provides the following targets:
#
@@ -77,7 +77,9 @@ GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/configure.scan \
`AUX_DIR=$(srcdir)/$$($(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1'); for x in \
`AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \
test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \
for x in \
ar-lib \
compile \
config.guess \
@@ -87,27 +89,33 @@ GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
ltmain.sh \
missing \
mkinstalldirs \
test-driver \
; do echo "$$AUX_DIR/$$x"; done` \
`$(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' $(srcdir)/configure.ac | \
`cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \
head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done`
#
# All modules should also be fine including the following variable, which
# removes automake-generated Makefile.in files:
GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \
`$(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' $(srcdir)/configure.ac | \
`cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \
while read f; do \
case $$f in Makefile|*/Makefile) \
test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \
done`
#
# Modules that use libtool /and/ use AC_CONFIG_MACRO_DIR([m4]) may also
# include this:
# Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this,
# though it's harmless to include regardless.
GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \
$(srcdir)/m4/libtool.m4 \
$(srcdir)/m4/ltoptions.m4 \
$(srcdir)/m4/ltsugar.m4 \
$(srcdir)/m4/ltversion.m4 \
$(srcdir)/m4/lt~obsolete.m4
`MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \
if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \
for x in \
libtool.m4 \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
lt~obsolete.m4 \
; do echo "$$MACRO_DIR/$$x"; done; \
fi`
@@ -158,6 +166,8 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
"tmpl/*.bak" \
xml html \
; do echo "/$$x"; done; \
FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \
case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \
fi; \
if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
for lc in $(DOC_LINGUAS); do \
@@ -192,6 +202,11 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(gsettings__enum_file) \
; do echo "/$$x"; done; \
fi; \
if test "x$(appdata_XML)" = x; then :; else \
for x in \
$(appdata_XML:.xml=.valid) \
; do echo "/$$x"; done; \
fi; \
if test -f $(srcdir)/po/Makefile.in.in; then \
for x in \
po/Makefile.in.in \
@@ -233,7 +248,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
if test "x$(am__dirstamp)" = x; then :; else \
echo "$(am__dirstamp)"; \
fi; \
if test "x$(LTCOMPILE)" = x; then :; else \
if test "x$(LTCOMPILE)" = x -a "x$(GTKDOC_RUN)" = x; then :; else \
for x in \
"*.lo" \
".libs" "_libs" \
@@ -248,7 +263,12 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \
so_locations \
$(MOSTLYCLEANFILES) \
$(TEST_LOGS) \
$(TEST_LOGS:.log=.trs) \
$(TEST_SUITE_LOG) \
"*.$(OBJEXT)" \
"*.gcda" \
"*.gcno" \
$(DISTCLEANFILES) \
$(am__CONFIG_DISTCLEAN_FILES) \
$(CONFIG_CLEAN_FILES) \
@@ -257,6 +277,10 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(MAINTAINERCLEANFILES) \
$(BUILT_SOURCES) \
$(DEPDIR) \
$(patsubst %.vala,%.c,$(filter %.vala,$(SOURCES))) \
$(filter %_vala.stamp,$(DIST_COMMON)) \
$(filter %.vapi,$(DIST_COMMON)) \
$(filter $(addprefix %,$(notdir $(patsubst %.vapi,%.h,$(filter %.vapi,$(DIST_COMMON))))),$(DIST_COMMON)) \
Makefile \
Makefile.in \
"*.orig" \
+34 -318
View File
@@ -1243,11 +1243,11 @@ gtk_built_public_sources = \
gtk_built_private_headers = \
gtkresources.h \
gtkmarshalers.h \
gtkbuiltincache.h \
gtkprivatetypebuiltins.h
gtk_built_sources = \
gtkresources.c \
gtk.gresource.xml \
gtktypebuiltins.c \
gtktypefuncs.c \
gtkmarshalers.c \
@@ -1258,8 +1258,7 @@ gtk_built_sources = \
stamp_files = \
stamp-gtkmarshalers.h \
stamp-gtktypebuiltins.h \
stamp-gtkprivatetypebuiltins.h \
stamp-icons
stamp-gtkprivatetypebuiltins.h
# non-header sources (headers should be specified in the above variables)
# that don't serve as direct make target sources, i.e. they don't have
@@ -1280,7 +1279,6 @@ MAINTAINERCLEANFILES = \
$(gtk_built_sources) \
$(gtk_dbus_built_sources) \
$(stamp_files) \
$(GENERATED_ICONS) \
stock-icons/icon-theme.cache
DISTCLEANFILES =
@@ -1288,7 +1286,6 @@ DISTCLEANFILES =
EXTRA_HEADERS =
EXTRA_DIST += $(gtk_all_private_h_sources) $(gtk_extra_sources)
EXTRA_DIST += $(gtk_built_sources)
EXTRA_DIST += $(STOCK_ICONS)
pkgdatadir=$(datadir)/gtk-$(GTK_API_VERSION)
@@ -1339,8 +1336,7 @@ CLEANFILES = $(gen_sources)
BUILT_SOURCES = \
$(gtk_built_sources) \
$(gtk_dbus_built_sources) \
stamp-icons
$(gtk_dbus_built_sources)
# all autogenerated files need to be generated in the srcdir,
# so old versions get remade and are not confused with newer
@@ -1374,7 +1370,7 @@ gtktypebuiltins.c: $(gtk_public_h_sources) $(a11y_h_sources) $(deprecated_h_sour
&& cp xgen-gtbc gtktypebuiltins.c \
&& rm -f xgen-gtbc
gtk.gresource.xml:
gtk.gresource.xml: Makefile.am
$(AM_V_GEN) echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@; \
echo -e "<gresources>" >> $@; \
echo -e " <gresource prefix=\"/org/gtk/libgtk\">" >> $@; \
@@ -1382,6 +1378,14 @@ gtk.gresource.xml:
n=`basename $$f`; \
echo -e " <file alias=\"theme/Raleigh.css\">theme/Raleigh/$$n</file>" >> $@; \
done; \
echo -e " <file alias=\"theme/Adwaita.css\">theme/Adwaita/gtk.css</file>" >> $@; \
echo -e " <file alias=\"theme/Adwaita-dark.css\">theme/Adwaita/gtk-dark.css</file>" >> $@; \
echo -e " <file>theme/Adwaita/gtk-contained.css</file>" >> $@; \
echo -e " <file>theme/Adwaita/gtk-contained-dark.css</file>" >> $@; \
for f in $(srcdir)/resources/theme/Adwaita/assets/*; do \
n=`basename $$f`; \
echo -e " <file preprocess=\"to-pixdata\">theme/Adwaita/assets/$$n</file>" >> $@; \
done; \
if test "$(win32_theme)" = "yes"; then \
for f in $(srcdir)/resources/theme/win32/*.css; do \
n=`basename $$f`; \
@@ -1396,15 +1400,33 @@ gtk.gresource.xml:
n=`basename $$f`; \
echo -e " <file compressed=\"true\">ui/$$n</file>" >> $@; \
done; \
for s in 16x16 22x22 24x24 32x32; do \
for f in $(srcdir)/resources/icons/hicolor/$$s/actions/*.png; do \
n=`basename $$f`; \
echo -e " <file>icons/hicolor/$$s/actions/$$n</file>" >> $@; \
done; \
done; \
echo -e " </gresource>" >> $@; \
echo -e "</gresources>" >> $@;
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/gtk.gresource.xml)
adwaita_sources = \
resources/theme/Adwaita/assets.svg \
resources/theme/Adwaita/_colors.scss \
resources/theme/Adwaita/_common.scss \
resources/theme/Adwaita/_drawing.scss \
resources/theme/Adwaita/gtk-contained.scss \
resources/theme/Adwaita/gtk-contained-dark.scss \
resources/theme/Adwaita/parse-sass.sh \
resources/theme/Adwaita/render-assets.sh \
resources/theme/Adwaita/assets.txt
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(builddir)/gtk.gresource.xml)
gtkresources.h: gtk.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gtk.gresource.xml \
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
--target=$@ --sourcedir=$(srcdir)/resources --c-name _gtk --generate-header --manual-register
gtkresources.c: gtk.gresource.xml $(resource_files) $(template_headers)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gtk.gresource.xml \
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< \
--target=$@ --sourcedir=$(srcdir)/resources --c-name _gtk --generate-source --manual-register
gtkprivatetypebuiltins.h: stamp-gtkprivatetypebuiltins.h
@@ -1654,298 +1676,6 @@ files:
echo $$p; \
done
STOCK_ICONS = \
stock-icons/16/document-open-recent.png \
stock-icons/16/help-about.png \
stock-icons/16/list-add.png \
stock-icons/16/media-optical.png \
stock-icons/16/window-close.png \
stock-icons/16/window-minimize.png \
stock-icons/16/window-maximize.png \
stock-icons/16/window-restore.png \
stock-icons/16/window-delete.png \
stock-icons/16/gtk-connect.png \
stock-icons/16/gtk-convert.png \
stock-icons/16/edit-clear.png \
stock-icons/16/edit-copy.png \
stock-icons/16/edit-cut.png \
stock-icons/16/edit-delete.png \
stock-icons/16/folder.png \
stock-icons/16/gtk-disconnect.png \
stock-icons/16/gtk-edit.png \
stock-icons/16/system-run.png \
stock-icons/16/text-x-generic.png \
stock-icons/16/edit-find-replace.png \
stock-icons/16/edit-find.png \
stock-icons/16/media-floppy.png \
stock-icons/16/view-fullscreen.png \
stock-icons/16/go-previous-ltr.png \
stock-icons/16/go-down.png \
stock-icons/16/go-next-ltr.png \
stock-icons/16/go-bottom.png \
stock-icons/16/go-first-ltr.png \
stock-icons/16/go-last-ltr.png \
stock-icons/16/go-top.png \
stock-icons/16/go-up.png \
stock-icons/16/gtk-caps-lock-warning.png \
stock-icons/16/gtk-color-picker.png \
stock-icons/16/drive-harddisk.png \
stock-icons/16/help-contents.png \
stock-icons/16/go-home.png \
stock-icons/16/format-indent-more-ltr.png \
stock-icons/16/format-indent-more-rtl.png \
stock-icons/16/gtk-index.png \
stock-icons/16/dialog-information.png \
stock-icons/16/go-jump-ltr.png \
stock-icons/16/go-jump-rtl.png \
stock-icons/16/format-justify-center.png \
stock-icons/16/format-justify-fill.png \
stock-icons/16/format-justify-left.png \
stock-icons/16/format-justify-right.png \
stock-icons/16/view-restore.png \
stock-icons/16/media-seek-forward-ltr.png \
stock-icons/16/media-skip-forward-ltr.png \
stock-icons/16/media-playback-pause.png \
stock-icons/16/media-playback-start-ltr.png \
stock-icons/16/media-playback-start-rtl.png \
stock-icons/16/media-skip-backward-ltr.png \
stock-icons/16/media-record.png \
stock-icons/16/media-seek-backward-ltr.png \
stock-icons/16/media-playback-stop.png \
stock-icons/16/image-missing.png \
stock-icons/16/network-idle.png \
stock-icons/16/document-new.png \
stock-icons/16/document-open.png \
stock-icons/16/gtk-orientation-landscape.png \
stock-icons/16/gtk-orientation-portrait.png \
stock-icons/16/gtk-orientation-reverse-landscape.png \
stock-icons/16/gtk-orientation-reverse-portrait.png \
stock-icons/16/gtk-page-setup.png \
stock-icons/16/edit-paste.png \
stock-icons/16/gtk-preferences.png \
stock-icons/16/document-print.png \
stock-icons/16/printer-error.png \
stock-icons/16/printer-paused.png \
stock-icons/16/document-print-preview.png \
stock-icons/16/printer-info.png \
stock-icons/16/printer-warning.png \
stock-icons/16/document-properties.png \
stock-icons/16/application-exit.png \
stock-icons/16/edit-redo-ltr.png \
stock-icons/16/edit-redo-rtl.png \
stock-icons/16/view-refresh.png \
stock-icons/16/list-remove.png \
stock-icons/16/document-revert-ltr.png \
stock-icons/16/document-revert-rtl.png \
stock-icons/16/document-save-as.png \
stock-icons/16/edit-select-all.png \
stock-icons/16/gtk-select-color.png \
stock-icons/16/gtk-select-font.png \
stock-icons/16/view-sort-ascending.png \
stock-icons/16/view-sort-descending.png \
stock-icons/16/tools-check-spelling.png \
stock-icons/16/process-stop.png \
stock-icons/16/format-text-strikethrough.png \
stock-icons/16/gtk-font.png \
stock-icons/16/gtk-undelete-ltr.png \
stock-icons/16/gtk-undelete-rtl.png \
stock-icons/16/format-text-underline.png \
stock-icons/16/edit-undo-ltr.png \
stock-icons/16/edit-undo-rtl.png \
stock-icons/16/format-indent-less-ltr.png \
stock-icons/16/format-indent-less-rtl.png \
stock-icons/16/zoom-original.png \
stock-icons/16/zoom-fit-best.png \
stock-icons/16/zoom-in.png \
stock-icons/16/zoom-out.png \
stock-icons/16/format-text-italic.png \
stock-icons/16/format-text-bold.png \
stock-icons/20/gtk-apply.png \
stock-icons/20/gtk-cancel.png \
stock-icons/20/window-close.png \
stock-icons/20/gtk-no.png \
stock-icons/20/gtk-ok.png \
stock-icons/20/gtk-yes.png \
stock-icons/24/audio-volume-high.png \
stock-icons/24/audio-volume-low.png \
stock-icons/24/audio-volume-medium.png \
stock-icons/24/audio-volume-muted.png \
stock-icons/24/document-open-recent.png \
stock-icons/24/help-about.png \
stock-icons/24/list-add.png \
stock-icons/24/format-text-bold.png \
stock-icons/24/media-optical.png \
stock-icons/24/edit-clear.png \
stock-icons/24/window-close.png \
stock-icons/24/gtk-caps-lock-warning.png \
stock-icons/24/gtk-color-picker.png \
stock-icons/24/gtk-connect.png \
stock-icons/24/gtk-convert.png \
stock-icons/24/edit-copy.png \
stock-icons/24/edit-cut.png \
stock-icons/24/folder.png \
stock-icons/24/gtk-disconnect.png \
stock-icons/24/gtk-edit.png \
stock-icons/24/system-run.png \
stock-icons/24/text-x-generic.png \
stock-icons/24/edit-find-replace.png \
stock-icons/24/edit-find.png \
stock-icons/24/gtk-font.png \
stock-icons/24/view-fullscreen.png \
stock-icons/24/go-previous-ltr.png \
stock-icons/24/go-top.png \
stock-icons/24/go-down.png \
stock-icons/24/go-bottom.png \
stock-icons/24/go-first-ltr.png \
stock-icons/24/go-last-ltr.png \
stock-icons/24/go-up.png \
stock-icons/24/drive-harddisk.png \
stock-icons/24/help-contents.png \
stock-icons/24/go-home.png \
stock-icons/24/format-indent-more-ltr.png \
stock-icons/24/format-indent-more-rtl.png \
stock-icons/24/gtk-index.png \
stock-icons/24/dialog-information.png \
stock-icons/24/format-text-italic.png \
stock-icons/24/go-jump-ltr.png \
stock-icons/24/go-jump-rtl.png \
stock-icons/24/format-justify-center.png \
stock-icons/24/format-justify-fill.png \
stock-icons/24/format-justify-left.png \
stock-icons/24/format-justify-right.png \
stock-icons/24/view-restore.png \
stock-icons/24/media-seek-forward-ltr.png \
stock-icons/24/media-skip-forward-ltr.png \
stock-icons/24/media-playback-pause.png \
stock-icons/24/media-playback-start-ltr.png \
stock-icons/24/media-playback-start-rtl.png \
stock-icons/24/media-skip-backward-ltr.png \
stock-icons/24/media-record.png \
stock-icons/24/media-seek-backward-ltr.png \
stock-icons/24/media-playback-stop.png \
stock-icons/24/image-missing.png \
stock-icons/24/network-idle.png \
stock-icons/24/document-new.png \
stock-icons/24/document-open.png \
stock-icons/24/gtk-orientation-reverse-landscape.png \
stock-icons/24/gtk-orientation-landscape.png \
stock-icons/24/gtk-orientation-reverse-portrait.png \
stock-icons/24/gtk-orientation-portrait.png \
stock-icons/24/gtk-page-setup.png \
stock-icons/24/edit-paste.png \
stock-icons/24/gtk-preferences.png \
stock-icons/24/document-print.png \
stock-icons/24/printer-error.png \
stock-icons/24/printer-paused.png \
stock-icons/24/document-print-preview.png \
stock-icons/24/printer-info.png \
stock-icons/24/printer-warning.png \
stock-icons/24/document-properties.png \
stock-icons/24/application-exit.png \
stock-icons/24/edit-redo-ltr.png \
stock-icons/24/edit-redo-rtl.png \
stock-icons/24/view-refresh.png \
stock-icons/24/list-remove.png \
stock-icons/24/document-revert-ltr.png \
stock-icons/24/document-revert-rtl.png \
stock-icons/24/gtk-select-font.png \
stock-icons/24/document-save-as.png \
stock-icons/24/media-floppy.png \
stock-icons/24/edit-select-all.png \
stock-icons/24/gtk-select-color.png \
stock-icons/24/view-sort-ascending.png \
stock-icons/24/view-sort-descending.png \
stock-icons/24/tools-check-spelling.png \
stock-icons/24/process-stop.png \
stock-icons/24/format-text-strikethrough.png \
stock-icons/24/edit-delete.png \
stock-icons/24/gtk-undelete-ltr.png \
stock-icons/24/gtk-undelete-rtl.png \
stock-icons/24/format-text-underline.png \
stock-icons/24/edit-undo-ltr.png \
stock-icons/24/edit-undo-rtl.png \
stock-icons/24/format-indent-less-ltr.png \
stock-icons/24/format-indent-less-rtl.png \
stock-icons/24/zoom-original.png \
stock-icons/24/zoom-fit-best.png \
stock-icons/24/zoom-in.png \
stock-icons/24/zoom-out.png \
stock-icons/24/go-next-ltr.png \
stock-icons/32/gtk-dnd-multiple.png \
stock-icons/32/gtk-dnd.png \
stock-icons/48/dialog-password.png \
stock-icons/48/dialog-error.png \
stock-icons/48/dialog-information.png \
stock-icons/48/dialog-question.png \
stock-icons/48/dialog-warning.png
GENERATED_ICONS = \
stock-icons/16/go-previous-rtl.png \
stock-icons/16/go-next-rtl.png \
stock-icons/16/go-first-rtl.png \
stock-icons/16/go-last-rtl.png \
stock-icons/16/media-seek-forward-rtl.png \
stock-icons/16/media-skip-forward-rtl.png \
stock-icons/16/media-skip-backward-rtl.png \
stock-icons/16/media-seek-backward-rtl.png \
stock-icons/16/document-save.png \
stock-icons/16/folder-remote.png \
stock-icons/16/user-home.png \
stock-icons/16/user-desktop.png \
stock-icons/24/go-previous-rtl.png \
stock-icons/24/go-next-rtl.png \
stock-icons/24/go-first-rtl.png \
stock-icons/24/go-last-rtl.png \
stock-icons/24/media-seek-forward-rtl.png \
stock-icons/24/media-skip-forward-rtl.png \
stock-icons/24/media-skip-backward-rtl.png \
stock-icons/24/media-seek-backward-rtl.png \
stock-icons/24/document-save.png \
stock-icons/24/folder-remote.png \
stock-icons/24/user-home.png \
stock-icons/24/user-desktop.png
# need to copy the icons so that we can replace the generated ones with
# symlinks, even in the readonly srcdir case
stamp-icons: $(STOCK_ICONS)
$(AM_V_GEN) if [ ! -d stock-icons ]; then \
for d in 16 20 24 32 48; do \
mkdir -p stock-icons/$$d; \
done; \
for f in $(STOCK_ICONS); do \
cp $(srcdir)/$$f $$(dirname $$f); \
done; \
chmod -R u+w stock-icons; \
fi && \
for i in 16 24; do \
(cd stock-icons/$$i \
&& $(RM) go-previous-rtl.png \
&& $(LN_S) go-next-ltr.png go-previous-rtl.png \
&& $(RM) go-next-rtl.png \
&& $(LN_S) go-previous-ltr.png go-next-rtl.png \
&& $(RM) go-first-rtl.png \
&& $(LN_S) go-last-ltr.png go-first-rtl.png \
&& $(RM) go-last-rtl.png \
&& $(LN_S) go-first-ltr.png go-last-rtl.png \
&& $(RM) media-seek-forward-rtl.png \
&& $(LN_S) media-seek-backward-ltr.png media-seek-forward-rtl.png \
&& $(RM) media-skip-forward-rtl.png \
&& $(LN_S) media-skip-backward-ltr.png media-skip-forward-rtl.png \
&& $(RM) media-skip-backward-rtl.png \
&& $(LN_S) media-skip-forward-ltr.png media-skip-backward-rtl.png \
&& $(RM) media-seek-backward-rtl.png \
&& $(LN_S) media-seek-forward-ltr.png media-seek-backward-rtl.png \
&& $(RM) document-save.png \
&& $(LN_S) media-floppy.png document-save.png \
&& $(RM) folder-remote.png \
&& $(LN_S) folder.png folder-remote.png \
&& $(RM) user-home.png \
&& $(LN_S) folder.png user-home.png \
&& $(RM) user-desktop.png \
&& $(LN_S) folder.png user-desktop.png \
) done \
&& touch stamp-icons
if USE_EXTERNAL_ICON_CACHE
gtk_update_icon_cache_program = $(GTK_UPDATE_ICON_CACHE)
else
@@ -1956,18 +1686,6 @@ gtk_update_icon_cache_program = ./gtk-update-icon-cache$(EXEEXT)
endif
endif
gtkbuiltincache.h: stamp-icons
if !USE_EXTERNAL_ICON_CACHE
if CROSS_COMPILING
$(AM_V_at) $(MAKE) $(AM_MAKEFLAGS) -C native/
else
$(AM_V_at) $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
endif
endif
$(AM_V_GEN) $(gtk_update_icon_cache_program) --quiet --force --ignore-theme-index \
--source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
mv gtkbuiltincache.h.tmp gtkbuiltincache.h
gsettings_SCHEMAS = \
org.gtk.Settings.FileChooser.gschema.xml \
org.gtk.Settings.ColorChooser.gschema.xml \
@@ -1977,8 +1695,7 @@ gsettings_SCHEMAS = \
EXTRA_DIST += \
$(resource_files) \
$(STOCK_ICONS) \
$(GENERATED_ICONS) \
$(adwaita_sources) \
$(gsettings_SCHEMAS) \
gtk-win32.rc \
gtk-win32.rc.in \
@@ -1988,7 +1705,6 @@ EXTRA_DIST += \
gtkprint-win32.h \
gtkprint-win32.c \
gtksearchenginequartz.h \
gtk.gresource.xml \
gtkdbusinterfaces.xml \
gtk-keys.css.default \
gtk-keys.css.emacs \
-1
View File
@@ -1659,7 +1659,6 @@ palette_new (GtkColorSelection *colorsel)
g_object_set_data (G_OBJECT (retval), I_("color_set"), GINT_TO_POINTER (0));
gtk_widget_set_events (retval, GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
| GDK_EXPOSURE_MASK
| GDK_ENTER_NOTIFY_MASK
| GDK_LEAVE_NOTIFY_MASK);
+1 -3
View File
@@ -493,8 +493,7 @@ gtk_handle_box_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = (gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK);
attributes.event_mask = gtk_widget_get_events (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
@@ -508,7 +507,6 @@ gtk_handle_box_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = (gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
| GDK_BUTTON1_MOTION_MASK
| GDK_POINTER_MOTION_HINT_MASK
| GDK_BUTTON_PRESS_MASK
+4 -15
View File
@@ -1454,8 +1454,6 @@ find_and_render_icon_source (GtkIconSet *icon_set,
return pixbuf;
}
extern GtkIconCache *_builtin_cache;
static GdkPixbuf*
render_fallback_image (GtkStyleContext *context,
GtkTextDirection direction,
@@ -1467,21 +1465,12 @@ render_fallback_image (GtkStyleContext *context,
if (fallback_source.type == GTK_ICON_SOURCE_EMPTY)
{
gint index;
GdkPixbuf *pixbuf;
_gtk_icon_theme_ensure_builtin_cache ();
index = _gtk_icon_cache_get_directory_index (_builtin_cache, "24");
pixbuf = _gtk_icon_cache_get_icon (_builtin_cache, "image-missing", index);
g_return_val_if_fail(pixbuf != NULL, NULL);
gtk_icon_source_set_pixbuf (&fallback_source, pixbuf);
g_object_unref (pixbuf);
fallback_source.type = GTK_ICON_SOURCE_STATIC_ICON_NAME;
fallback_source.source.icon_name = (gchar *)"image-missing";
fallback_source.direction = GTK_TEXT_DIR_NONE;
}
return gtk_render_icon_pixbuf (context, &fallback_source, size);
return render_icon_name_pixbuf (&fallback_source, context, size, 1);
}
static GdkPixbuf*
+2 -2
View File
@@ -45,7 +45,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* The horizontal and vertical alignment attributes enable the widget to be
* positioned within its allocated area. Note that if the widget is added to
* a container in such a way that it expands automatically to fill its
* allocated area, the alignment settings will not alter the widgets position.
* allocated area, the alignment settings will not alter the widget's position.
*
* Note that the desired effect can in most cases be achieved by using the
* #GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties
@@ -396,7 +396,7 @@ gtk_misc_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
+92 -227
View File
@@ -125,8 +125,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ADD:
*
* The Add item.
* ![](list-add.png)
* The Add item and icon.
*
* Deprecated: 3.10: Use named icon &quot;list-add&quot; or the label &quot;_Add&quot;.
*/
@@ -135,8 +134,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_APPLY:
*
* The Apply item.
* ![](gtk-apply.png)
* The Apply item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Apply&quot;.
*/
@@ -145,8 +143,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_BOLD:
*
* The Bold item.
* ![](format-text-bold.png)
* The Bold item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-text-bold&quot;.
*/
@@ -155,8 +152,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_CANCEL:
*
* The Cancel item.
* ![](gtk-cancel.png)
* The Cancel item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Cancel&quot;.
*/
@@ -166,7 +162,6 @@ typedef char * GtkStock;
* GTK_STOCK_CAPS_LOCK_WARNING:
*
* The Caps Lock Warning icon.
* ![](gtk-caps-lock-warning.png)
*
* Since: 2.16
*
@@ -177,8 +172,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_CDROM:
*
* The CD-Rom item.
* ![](media-optical.png)
* The CD-Rom item and icon.
*
* Deprecated: 3.10: Use named icon &quot;media-optical&quot;.
*/
@@ -187,8 +181,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_CLEAR:
*
* The Clear item.
* ![](edit-clear.png)
* The Clear item and icon.
*
* Deprecated: 3.10: Use named icon &quot;edit-clear&quot;.
*/
@@ -197,8 +190,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_CLOSE:
*
* The Close item.
* ![](window-close.png)
* The Close item and icon.
*
* Deprecated: 3.10: Use named icon &quot;window-close&quot; or the label &quot;_Close&quot;.
*/
@@ -207,8 +199,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_COLOR_PICKER:
*
* The Color Picker item.
* ![](gtk-color-picker.png)
* The Color Picker item and icon.
*
* Since: 2.2
*
@@ -220,7 +211,6 @@ typedef char * GtkStock;
* GTK_STOCK_CONNECT:
*
* The Connect icon.
* ![](gtk-connect.png)
*
* Since: 2.6
*
@@ -231,8 +221,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_CONVERT:
*
* The Convert item.
* ![](gtk-convert.png)
* The Convert item and icon.
*
* Deprecated: 3.10
*/
@@ -241,8 +230,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_COPY:
*
* The Copy item.
* ![](edit-copy.png)
* The Copy item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Copy&quot;.
*/
@@ -251,8 +239,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_CUT:
*
* The Cut item.
* ![](edit-cut.png)
* The Cut item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;Cu_t&quot;.
*/
@@ -261,8 +248,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_DELETE:
*
* The Delete item.
* ![](edit-delete.png)
* The Delete item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Delete&quot;.
*/
@@ -271,8 +257,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_DIALOG_AUTHENTICATION:
*
* The Authentication item.
* ![](dialog-password.png)
* The Authentication item and icon.
*
* Since: 2.4
*
@@ -283,8 +268,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_DIALOG_INFO:
*
* The Information item.
* ![](dialog-information.png)
* The Information item and icon.
*
* Deprecated: 3.10: Use named icon &quot;dialog-information&quot;.
*/
@@ -293,8 +277,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_DIALOG_WARNING:
*
* The Warning item.
* ![](dialog-warning.png)
* The Warning item and icon.
*
* Deprecated: 3.10: Use named icon &quot;dialog-warning&quot;.
*/
@@ -303,8 +286,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_DIALOG_ERROR:
*
* The Error item.
* ![](dialog-error.png)
* The Error item and icon.
*
* Deprecated: 3.10: Use named icon &quot;dialog-error&quot;.
*/
@@ -313,8 +295,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_DIALOG_QUESTION:
*
* The Question item.
* ![](dialog-question.png)
* The Question item and icon.
*
* Deprecated: 3.10: Use named icon &quot;dialog-question&quot;.
*/
@@ -324,7 +305,6 @@ typedef char * GtkStock;
* GTK_STOCK_DIRECTORY:
*
* The Directory icon.
* ![](folder.png)
*
* Since: 2.6
*
@@ -347,7 +327,6 @@ typedef char * GtkStock;
* GTK_STOCK_DISCONNECT:
*
* The Disconnect icon.
* ![](gtk-disconnect.png)
*
* Since: 2.6
*
@@ -359,7 +338,6 @@ typedef char * GtkStock;
* GTK_STOCK_DND:
*
* The Drag-And-Drop icon.
* ![](gtk-dnd.png)
*
* Deprecated: 3.10
*/
@@ -369,7 +347,6 @@ typedef char * GtkStock;
* GTK_STOCK_DND_MULTIPLE:
*
* The Drag-And-Drop multiple icon.
* ![](gtk-dnd-multiple.png)
*
* Deprecated: 3.10
*/
@@ -378,8 +355,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_EDIT:
*
* The Edit item.
* ![](gtk-edit.png)
* The Edit item and icon.
*
* Since: 2.6
*
@@ -390,8 +366,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_EXECUTE:
*
* The Execute item.
* ![](system-run.png)
* The Execute item and icon.
*
* Deprecated: 3.10: Use named icon &quot;system-run&quot;.
*/
@@ -400,8 +375,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_FILE:
*
* The File item.
* ![](text-x-generic.png)
* The File item and icon.
*
* Since 3.0, this item has a label, before it only had an icon.
*
@@ -414,8 +388,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_FIND:
*
* The Find item.
* ![](edit-find.png)
* The Find item and icon.
*
* Deprecated: 3.10: Use named icon &quot;edit-find&quot;.
*/
@@ -424,8 +397,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_FIND_AND_REPLACE:
*
* The Find and Replace item.
* ![](edit-find-replace.png)
* The Find and Replace item and icon.
*
* Deprecated: 3.10: Use named icon &quot;edit-find-replace&quot;.
*/
@@ -434,8 +406,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_FLOPPY:
*
* The Floppy item.
* ![](media-floppy.png)
* The Floppy item and icon.
*
* Deprecated: 3.10
*/
@@ -444,8 +415,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_FULLSCREEN:
*
* The Fullscreen item.
* ![](view-fullscreen.png)
* The Fullscreen item and icon.
*
* Since: 2.8
*
@@ -456,8 +426,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GOTO_BOTTOM:
*
* The Bottom item.
* ![](go-bottom.png)
* The Bottom item and icon.
*
* Deprecated: 3.10: Use named icon &quot;go-bottom&quot;.
*/
@@ -466,10 +435,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GOTO_FIRST:
*
* The First item.
* ![](go-first-ltr.png)
* RTL variant
* ![](go-first-rtl.png)
* The First item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;go-first&quot;.
*/
@@ -478,10 +444,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GOTO_LAST:
*
* The Last item.
* ![](go-last-ltr.png)
* RTL variant
* ![](go-last-rtl.png)
* The Last item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;go-last&quot;.
*/
@@ -490,8 +453,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GOTO_TOP:
*
* The Top item.
* ![](go-top.png)
* The Top item and icon.
*
* Deprecated: 3.10: Use named icon &quot;go-top&quot;.
*/
@@ -500,10 +462,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GO_BACK:
*
* The Back item.
* ![](go-previous-ltr.png)
* RTL variant
* ![](go-previous-rtl.png)
* The Back item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;go-previous&quot;.
*/
@@ -512,8 +471,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GO_DOWN:
*
* The Down item.
* ![](go-down.png)
* The Down item and icon.
*
* Deprecated: 3.10: Use named icon &quot;go-down&quot;.
*/
@@ -522,10 +480,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GO_FORWARD:
*
* The Forward item.
* ![](go-next-ltr.png)
* RTL variant
* ![](go-next-rtl.png)
* The Forward item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;go-next&quot;.
*/
@@ -534,8 +489,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_GO_UP:
*
* The Up item.
* ![](go-up.png)
* The Up item and icon.
*
* Deprecated: 3.10: Use named icon &quot;go-up&quot;.
*/
@@ -544,8 +498,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_HARDDISK:
*
* The Harddisk item.
* ![](drive-harddisk.png)
* The Harddisk item and icon.
*
* Since: 2.4
*
@@ -556,8 +509,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_HELP:
*
* The Help item.
* ![](help-contents.png)
* The Help item and icon.
*
* Deprecated: 3.10: Use named icon &quot;help-browser&quot;.
*/
@@ -566,8 +518,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_HOME:
*
* The Home item.
* ![](go-home.png)
* The Home item and icon.
*
* Deprecated: 3.10: Use named icon &quot;go-home&quot;.
*/
@@ -576,8 +527,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_INDEX:
*
* The Index item.
* ![](gtk-index.png)
* The Index item and icon.
*
* Deprecated: 3.10
*/
@@ -586,10 +536,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_INDENT:
*
* The Indent item.
* ![](format-indent-more-ltr.png)
* RTL variant
* ![](format-indent-more-rtl.png)
* The Indent item and icon. The icon has an RTL variant.
*
* Since: 2.4
*
@@ -600,8 +547,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_INFO:
*
* The Info item.
* ![](dialog-information.png)
* The Info item and icon.
*
* Since: 2.8
*
@@ -612,8 +558,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ITALIC:
*
* The Italic item.
* ![](format-text-italic.png)
* The Italic item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-text-italic&quot;.
*/
@@ -622,10 +567,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_JUMP_TO:
*
* The Jump to item.
* ![](go-jump-ltr.png)
* RTL-variant
* ![](go-jump-rtl.png)
* The Jump to item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;go-jump&quot;.
*/
@@ -634,8 +576,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_JUSTIFY_CENTER:
*
* The Center item.
* ![](format-justify-center.png)
* The Center item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-justify-center&quot;.
*/
@@ -644,8 +585,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_JUSTIFY_FILL:
*
* The Fill item.
* ![](format-justify-fill.png)
* The Fill item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-justify-fill&quot;.
*/
@@ -654,8 +594,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_JUSTIFY_LEFT:
*
* The Left item.
* ![](format-justify-left.png)
* The Left item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-justify-left&quot;.
*/
@@ -664,8 +603,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_JUSTIFY_RIGHT:
*
* The Right item.
* ![](format-justify-right.png)
* The Right item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-justify-right&quot;.
*/
@@ -674,8 +612,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_LEAVE_FULLSCREEN:
*
* The Leave Fullscreen item.
* ![](view-restore.png)
* The Leave Fullscreen item and icon.
*
* Since: 2.8
*
@@ -687,7 +624,6 @@ typedef char * GtkStock;
* GTK_STOCK_MISSING_IMAGE:
*
* The Missing image icon.
* ![](image-missing.png)
*
* Deprecated: 3.10: Use named icon &quot;image-missing&quot;.
*/
@@ -696,10 +632,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_FORWARD:
*
* The Media Forward item.
* ![](media-seek-forward-ltr.png)
* RTL variant
* ![](media-seek-forward-rtl.png)
* The Media Forward item and icon. The icon has an RTL variant.
*
* Since: 2.6
*
@@ -710,10 +643,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_NEXT:
*
* The Media Next item.
* ![](media-skip-forward-ltr.png)
* RTL variant
* ![](media-skip-forward-rtl.png)
* The Media Next item and icon. The icon has an RTL variant.
*
* Since: 2.6
*
@@ -724,8 +654,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_PAUSE:
*
* The Media Pause item.
* ![](media-playback-pause.png)
* The Media Pause item and icon.
*
* Since: 2.6
*
@@ -736,10 +665,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_PLAY:
*
* The Media Play item.
* ![](media-playback-start-ltr.png)
* RTL variant
* ![](media-playback-start-rtl.png)
* The Media Play item and icon. The icon has an RTL variant.
*
* Since: 2.6
*
@@ -750,10 +676,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_PREVIOUS:
*
* The Media Previous item.
* ![](media-skip-backward-ltr.png)
* RTL variant
* ![](media-skip-backward-rtl.png)
* The Media Previous item and icon. The icon has an RTL variant.
*
* Since: 2.6
*
@@ -764,8 +687,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_RECORD:
*
* The Media Record item.
* ![](media-record.png)
* The Media Record item and icon.
*
* Since: 2.6
*
@@ -776,10 +698,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_REWIND:
*
* The Media Rewind item.
* ![](media-seek-backward-ltr.png)
* RTL variant
* ![](media-seek-backward-rtl.png)
* The Media Rewind item and icon. The icon has an RTL variant.
*
* Since: 2.6
*
@@ -790,8 +709,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_MEDIA_STOP:
*
* The Media Stop item.
* ![](media-playback-stop.png)
* The Media Stop item and icon.
*
* Since: 2.6
*
@@ -802,8 +720,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_NETWORK:
*
* The Network item.
* ![](network-idle.png)
* The Network item and icon.
*
* Since: 2.4
*
@@ -814,8 +731,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_NEW:
*
* The New item.
* ![](document-new.png)
* The New item and icon.
*
* Deprecated: 3.10: Use named icon &quot;document-new&quot; or the label &quot;_New&quot;.
*/
@@ -824,8 +740,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_NO:
*
* The No item.
* ![](gtk-no.png)
* The No item and icon.
*
* Deprecated: 3.10
*/
@@ -834,8 +749,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_OK:
*
* The OK item.
* ![](gtk-ok.png)
* The OK item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_OK&quot;.
*/
@@ -844,8 +758,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_OPEN:
*
* The Open item.
* ![](document-open.png)
* The Open item and icon.
*
* Deprecated: 3.10: Use named icon &quot;document-open&quot; or the label &quot;_Open&quot;.
*/
@@ -854,8 +767,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ORIENTATION_PORTRAIT:
*
* The Portrait Orientation item.
* ![](gtk-orientation-portrait.png)
* The Portrait Orientation item and icon.
*
* Since: 2.10
*
@@ -866,8 +778,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ORIENTATION_LANDSCAPE:
*
* The Landscape Orientation item.
* ![](gtk-orientation-landscape.png)
* The Landscape Orientation item and icon.
*
* Since: 2.10
*
@@ -878,8 +789,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE:
*
* The Reverse Landscape Orientation item.
* ![](gtk-orientation-reverse-landscape.png)
* The Reverse Landscape Orientation item and icon.
*
* Since: 2.10
*
@@ -890,8 +800,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT:
*
* The Reverse Portrait Orientation item.
* ![](gtk-orientation-reverse-portrait.png)
* The Reverse Portrait Orientation item and icon.
*
* Since: 2.10
*
@@ -902,8 +811,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_PAGE_SETUP:
*
* The Page Setup item.
* ![](gtk-page-setup.png)
* The Page Setup item and icon.
*
* Since: 2.14
*
@@ -914,8 +822,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_PASTE:
*
* The Paste item.
* ![](edit-paste.png)
* The Paste item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Paste&quot;.
*/
@@ -924,8 +831,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_PREFERENCES:
*
* The Preferences item.
* ![](gtk-preferences.png)
* The Preferences item and icon.
*
* Deprecated: 3.10: Use named icon &quot;preferences-system&quot; or the label &quot;_Preferences&quot;.
*/
@@ -934,8 +840,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_PRINT:
*
* The Print item.
* ![](document-print.png)
* The Print item and icon.
*
* Deprecated: 3.10: Use named icon &quot;document-print&quot; or the label &quot;_Print&quot;.
*/
@@ -945,7 +850,6 @@ typedef char * GtkStock;
* GTK_STOCK_PRINT_ERROR:
*
* The Print Error icon.
* ![](printer-error.png)
*
* Since: 2.14
*
@@ -957,7 +861,6 @@ typedef char * GtkStock;
* GTK_STOCK_PRINT_PAUSED:
*
* The Print Paused icon.
* ![](printer-paused.png)
*
* Since: 2.14
*
@@ -968,8 +871,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_PRINT_PREVIEW:
*
* The Print Preview item.
* ![](document-print-preview.png)
* The Print Preview item and icon.
*
* Deprecated: 3.10: Use label &quot;Pre_view&quot;.
*/
@@ -979,7 +881,6 @@ typedef char * GtkStock;
* GTK_STOCK_PRINT_REPORT:
*
* The Print Report icon.
* ![](printer-info.png)
*
* Since: 2.14
*
@@ -992,7 +893,6 @@ typedef char * GtkStock;
* GTK_STOCK_PRINT_WARNING:
*
* The Print Warning icon.
* ![](printer-warning.png)
*
* Since: 2.14
*
@@ -1003,8 +903,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_PROPERTIES:
*
* The Properties item.
* ![](document-properties.png)
* The Properties item and icon.
*
* Deprecated: 3.10: Use named icon &quot;document-properties&quot; or the label &quot;_Properties&quot;.
*/
@@ -1013,8 +912,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_QUIT:
*
* The Quit item.
* ![](application-exit.png)
* The Quit item and icon.
*
* Deprecated: 3.10: Use named icon &quot;application-exit&quot; or the label &quot;_Quit&quot;.
*/
@@ -1023,10 +921,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_REDO:
*
* The Redo item.
* ![](edit-redo-ltr.png)
* RTL variant
* ![](edit-redo-rtl.png)
* The Redo item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;edit-redo&quot; or the label &quot;_Redo&quot;.
*/
@@ -1035,8 +930,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_REFRESH:
*
* The Refresh item.
* ![](view-refresh.png)
* The Refresh item and icon.
*
* Deprecated: 3.10: Use named icon &quot;view-refresh&quot; or the label &quot;_Refresh&quot;.
*/
@@ -1045,8 +939,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_REMOVE:
*
* The Remove item.
* ![](list-remove.png)
* The Remove item and icon.
*
* Deprecated: 3.10: Use named icon &quot;list-remove&quot; or the label &quot;_Remove&quot;.
*/
@@ -1055,10 +948,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_REVERT_TO_SAVED:
*
* The Revert item.
* ![](document-revert-ltr.png)
* RTL variant
* ![](document-revert-rtl.png)
* The Revert item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;document-revert&quot; or the label &quot;_Revert&quot;.
*/
@@ -1067,8 +957,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SAVE:
*
* The Save item.
* ![](document-save.png)
* The Save item and icon.
*
* Deprecated: 3.10: Use named icon &quot;document-save&quot; or the label &quot;_Save&quot;.
*/
@@ -1077,8 +966,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SAVE_AS:
*
* The Save As item.
* ![](document-save-as.png)
* The Save As item and icon.
*
* Deprecated: 3.10: Use named icon &quot;document-save-as&quot; or the label &quot;Save _As&quot;.
*/
@@ -1087,8 +975,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SELECT_ALL:
*
* The Select All item.
* ![](edit-select-all.png)
* The Select All item and icon.
*
* Since: 2.10
*
@@ -1099,8 +986,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SELECT_COLOR:
*
* The Color item.
* ![](gtk-select-color.png)
* The Color item and icon.
*
* Deprecated: 3.10
*/
@@ -1109,8 +995,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SELECT_FONT:
*
* The Font item.
* ![](gtk-font.png)
* The Font item and icon.
*
* Deprecated: 3.10
*/
@@ -1119,8 +1004,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SORT_ASCENDING:
*
* The Ascending item.
* ![](view-sort-ascending.png)
* The Ascending item and icon.
*
* Deprecated: 3.10: Use named icon &quot;view-sort-ascending&quot;.
*/
@@ -1129,8 +1013,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SORT_DESCENDING:
*
* The Descending item.
* ![](view-sort-descending.png)
* The Descending item and icon.
*
* Deprecated: 3.10: Use named icon &quot;view-sort-descending&quot;.
*/
@@ -1139,8 +1022,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_SPELL_CHECK:
*
* The Spell Check item.
* ![](tools-check-spelling.png)
* The Spell Check item and icon.
*
* Deprecated: 3.10: Use named icon &quot;tools-check-spelling&quot;.
*/
@@ -1149,8 +1031,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_STOP:
*
* The Stop item.
* ![](process-stop.png)
* The Stop item and icon.
*
* Deprecated: 3.10: Use named icon &quot;process-stop&quot; or the label &quot;_Stop&quot;.
*/
@@ -1159,8 +1040,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_STRIKETHROUGH:
*
* The Strikethrough item.
* ![](format-text-strikethrough.png)
* The Strikethrough item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-text-strikethrough&quot; or the label &quot;_Strikethrough&quot;.
*/
@@ -1169,10 +1049,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_UNDELETE:
*
* The Undelete item.
* ![](gtk-undelete-ltr.png)
* RTL variant
* ![](gtk-undelete-rtl.png)
* The Undelete item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10
*/
@@ -1181,8 +1058,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_UNDERLINE:
*
* The Underline item.
* ![](format-text-underline.png)
* The Underline item and icon.
*
* Deprecated: 3.10: Use named icon &quot;format-text-underline&quot; or the label &quot;_Underline&quot;.
*/
@@ -1191,10 +1067,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_UNDO:
*
* The Undo item.
* ![](edit-undo-ltr.png)
* RTL variant
* ![](edit-undo-rtl.png)
* The Undo item and icon. The icon has an RTL variant.
*
* Deprecated: 3.10: Use named icon &quot;edit-undo&quot; or the label &quot;_Undo&quot;.
*/
@@ -1203,10 +1076,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_UNINDENT:
*
* The Unindent item.
* ![](format-indent-less-ltr.png)
* RTL variant
* ![](format-indent-less-rtl.png)
* The Unindent item and icon. The icon has an RTL variant.
*
* Since: 2.4
*
@@ -1217,8 +1087,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_YES:
*
* The Yes item.
* ![](gtk-yes.png)
* The Yes item and icon.
*
* Deprecated: 3.10
*/
@@ -1227,8 +1096,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ZOOM_100:
*
* The Zoom 100% item.
* ![](zoom-original.png)
* The Zoom 100% item and icon.
*
* Deprecated: 3.10: Use named icon &quot;zoom-original&quot; or the label &quot;_Normal Size&quot;.
*/
@@ -1237,8 +1105,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ZOOM_FIT:
*
* The Zoom to Fit item.
* ![](zoom-fit-best.png)
* The Zoom to Fit item and icon.
*
* Deprecated: 3.10: Use named icon &quot;zoom-fit-best&quot; or the label &quot;Best _Fit&quot;.
*/
@@ -1247,8 +1114,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ZOOM_IN:
*
* The Zoom In item.
* ![](zoom-in.png)
* The Zoom In item and icon.
*
* Deprecated: 3.10: Use named icon &quot;zoom-in&quot; or the label &quot;Zoom _In&quot;.
*/
@@ -1257,8 +1123,7 @@ typedef char * GtkStock;
/**
* GTK_STOCK_ZOOM_OUT:
*
* The Zoom Out item.
* ![](zoom-out.png)
* The Zoom Out item and icon.
*
* Deprecated: 3.10: Use named icon &quot;zoom-out&quot; or the label &quot;Zoom _Out&quot;.
*/
+1 -1
View File
@@ -1713,7 +1713,7 @@ gtk_calendar_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_ONLY;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = (gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK
attributes.event_mask = (gtk_widget_get_events (widget)
| GDK_SCROLL_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK);
+1
View File
@@ -109,6 +109,7 @@ gtk_cell_renderer_pixbuf_init (GtkCellRendererPixbuf *cellpixbuf)
priv = cellpixbuf->priv;
priv->icon_helper = _gtk_icon_helper_new ();
_gtk_icon_helper_set_force_scale_pixbuf (priv->icon_helper, TRUE);
priv->icon_size = GTK_ICON_SIZE_MENU;
}
+3
View File
@@ -30,6 +30,7 @@
#include "gtkmenushell.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkcolorswatchaccessibleprivate.h"
@@ -632,6 +633,8 @@ swatch_size_allocate (GtkWidget *widget,
allocation->y,
allocation->width,
allocation->height);
_gtk_widget_set_simple_clip (widget);
}
static gboolean
+14 -2
View File
@@ -2342,6 +2342,18 @@ parse_selector_list (GtkCssScanner *scanner)
return selectors;
}
static gboolean
name_is_style_property (const char *name)
{
if (name[0] != '-')
return FALSE;
if (g_str_has_prefix (name, "-gtk-"))
return FALSE;
return TRUE;
}
static void
parse_declaration (GtkCssScanner *scanner,
GtkCssRuleset *ruleset)
@@ -2356,7 +2368,7 @@ parse_declaration (GtkCssScanner *scanner,
goto check_for_semicolon;
property = _gtk_style_property_lookup (name);
if (property == NULL && name[0] != '-')
if (property == NULL && !name_is_style_property (name))
{
gtk_css_provider_error (scanner->provider,
scanner,
@@ -2441,7 +2453,7 @@ parse_declaration (GtkCssScanner *scanner,
gtk_css_scanner_pop_section (scanner, GTK_CSS_SECTION_VALUE);
}
else if (name[0] == '-')
else if (name_is_style_property (name))
{
char *value_str;
+1 -1
View File
@@ -173,7 +173,7 @@ gtk_drawing_area_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
-1
View File
@@ -409,7 +409,6 @@ gtk_event_box_realize (GtkWidget *widget)
| GDK_BUTTON_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
| GDK_EXPOSURE_MASK
| GDK_ENTER_NOTIFY_MASK
| GDK_LEAVE_NOTIFY_MASK;
+1 -1
View File
@@ -368,7 +368,7 @@ gtk_fixed_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK;
attributes.event_mask |= GDK_BUTTON_PRESS_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
-1
View File
@@ -3077,7 +3077,6 @@ gtk_flow_box_realize (GtkWidget *widget)
| GDK_ENTER_NOTIFY_MASK
| GDK_LEAVE_NOTIFY_MASK
| GDK_POINTER_MOTION_MASK
| GDK_EXPOSURE_MASK
| GDK_KEY_PRESS_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK;
+1
View File
@@ -204,6 +204,7 @@ create_title_box (const char *title,
gtk_label_set_ellipsize (GTK_LABEL (subtitle_label), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (label_box), subtitle_label, FALSE, FALSE, 0);
gtk_widget_set_no_show_all (subtitle_label, TRUE);
gtk_widget_set_visible (subtitle_label, subtitle && subtitle[0]);
if (ret_title_label)
*ret_title_label = title_label;
+40
View File
@@ -300,6 +300,46 @@ _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
return GET_UINT16 (cache->buffer, image_offset + 2);
}
gboolean
_gtk_icon_cache_has_icons (GtkIconCache *cache,
const gchar *directory)
{
int directory_index;
guint32 hash_offset, n_buckets;
guint32 chain_offset;
guint32 image_list_offset, n_images;
int i, j;
directory_index = get_directory_index (cache, directory);
if (directory_index == -1)
return FALSE;
hash_offset = GET_UINT32 (cache->buffer, 4);
n_buckets = GET_UINT32 (cache->buffer, hash_offset);
for (i = 0; i < n_buckets; i++)
{
chain_offset = GET_UINT32 (cache->buffer, hash_offset + 4 + 4 * i);
while (chain_offset != 0xffffffff)
{
image_list_offset = GET_UINT32 (cache->buffer, chain_offset + 8);
n_images = GET_UINT32 (cache->buffer, image_list_offset);
for (j = 0; j < n_images; j++)
{
if (GET_UINT16 (cache->buffer, image_list_offset + 4 + 8 * j) ==
directory_index)
return TRUE;
}
chain_offset = GET_UINT32 (cache->buffer, chain_offset);
}
}
return FALSE;
}
void
_gtk_icon_cache_add_icons (GtkIconCache *cache,
const gchar *directory,
+2
View File
@@ -44,6 +44,8 @@ gboolean _gtk_icon_cache_has_icon (GtkIconCache *cache,
gboolean _gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
const gchar *icon_name,
const gchar *directory);
gboolean _gtk_icon_cache_has_icons (GtkIconCache *cache,
const gchar *directory);
void _gtk_icon_cache_add_icons (GtkIconCache *cache,
const gchar *directory,
GHashTable *hash_table);
+1 -1
View File
@@ -264,7 +264,7 @@ get_icon_lookup_flags (GtkIconHelper *self, GtkStyleContext *context)
if (self->priv->use_fallback)
flags |= GTK_ICON_LOOKUP_GENERIC_FALLBACK;
if (self->priv->pixel_size != -1)
if (self->priv->pixel_size != -1 || self->priv->force_scale_pixbuf)
flags |= GTK_ICON_LOOKUP_FORCE_SIZE;
flags |= _gtk_style_context_get_icon_lookup_flags (context);
+1117 -1405
View File
File diff suppressed because it is too large Load Diff
+4 -7
View File
@@ -352,23 +352,20 @@ GdkPixbuf * gtk_icon_info_load_symbolic_for_style (GtkIconInfo *ico
GtkStateType state,
gboolean *was_symbolic,
GError **error);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info,
gboolean raw_coordinates);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info,
GdkRectangle *rectangle);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_icon_info_get_attach_points (GtkIconInfo *icon_info,
GdkPoint **points,
gint *n_points);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
const gchar * gtk_icon_info_get_display_name (GtkIconInfo *icon_info);
/* Non-public methods */
void _gtk_icon_theme_ensure_builtin_cache (void);
G_END_DECLS
#endif /* __GTK_ICON_THEME_H__ */
+1 -20
View File
@@ -1312,8 +1312,7 @@ gtk_icon_view_realize (GtkWidget *widget)
attributes.y = 0;
attributes.width = MAX (icon_view->priv->width, allocation.width);
attributes.height = MAX (icon_view->priv->height, allocation.height);
attributes.event_mask = (GDK_EXPOSURE_MASK |
GDK_SCROLL_MASK |
attributes.event_mask = (GDK_SCROLL_MASK |
GDK_SMOOTH_SCROLL_MASK |
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -2522,7 +2521,6 @@ gtk_icon_view_update_rubberband (gpointer data)
gint x, y;
GdkRectangle old_area;
GdkRectangle new_area;
GdkRectangle common;
cairo_region_t *invalid_region;
icon_view = GTK_ICON_VIEW (data);
@@ -2551,23 +2549,6 @@ gtk_icon_view_update_rubberband (gpointer data)
invalid_region = cairo_region_create_rectangle (&old_area);
cairo_region_union_rectangle (invalid_region, &new_area);
gdk_rectangle_intersect (&old_area, &new_area, &common);
if (common.width > 2 && common.height > 2)
{
cairo_region_t *common_region;
/* make sure the border is invalidated */
common.x += 1;
common.y += 1;
common.width -= 2;
common.height -= 2;
common_region = cairo_region_create_rectangle (&common);
cairo_region_subtract (invalid_region, common_region);
cairo_region_destroy (common_region);
}
gdk_window_invalidate_region (icon_view->priv->bin_window, invalid_region, TRUE);
cairo_region_destroy (invalid_region);
+1 -1
View File
@@ -896,7 +896,7 @@ gtk_layout_realize (GtkWidget *widget)
attributes.y = - gtk_adjustment_get_value (priv->vadjustment);
attributes.width = MAX (priv->width, allocation.width);
attributes.height = MAX (priv->height, allocation.height);
attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK |
attributes.event_mask = GDK_SCROLL_MASK |
GDK_SMOOTH_SCROLL_MASK |
gtk_widget_get_events (widget);
+1 -1
View File
@@ -1892,7 +1892,7 @@ gtk_list_box_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget) |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK |
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK;
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK;
attributes.wclass = GDK_INPUT_OUTPUT;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
+1 -2
View File
@@ -151,8 +151,7 @@ _gtk_magnifier_init (GtkMagnifier *magnifier)
priv = _gtk_magnifier_get_instance_private (magnifier);
gtk_widget_set_events (widget,
gtk_widget_get_events (widget) |
GDK_EXPOSURE_MASK);
gtk_widget_get_events (widget));
gtk_widget_set_has_window (widget, FALSE);
priv->magnification = 1;
+25 -23
View File
@@ -1647,30 +1647,32 @@ gtk_main_do_event (GdkEvent *event)
break;
case GDK_EXPOSE:
if (event->any.window && gtk_widget_get_double_buffered (event_widget))
if (event->any.window)
{
/* We handle exposes only on native windows, relying on the
* draw() handler to propagate down to non-native windows.
* This is ok now that we child windows always are considered
* (semi)transparent.
*/
if (gdk_window_has_native (event->expose.window))
{
gdk_window_begin_paint_region (event->any.window, event->expose.region);
gtk_widget_send_expose (event_widget, event);
gdk_window_end_paint (event->any.window);
}
}
else
{
/* The app may paint with a previously allocated cairo_t,
* which will draw directly to the window. We can't catch cairo
* draw operations to automatically flush the window, thus we
* need to explicitly flush any outstanding moves or double
* buffering
*/
gdk_window_flush (event->any.window);
gtk_widget_send_expose (event_widget, event);
gboolean is_double_buffered;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
is_double_buffered = gtk_widget_get_double_buffered (event_widget);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (is_double_buffered)
{
/* We handle exposes only on native windows, relying on the
* draw() handler to propagate down to non-native windows.
* This is ok now that we child windows always are considered
* (semi)transparent.
*/
if (gdk_window_has_native (event->expose.window))
{
gdk_window_begin_paint_region (event->any.window, event->expose.region);
gtk_widget_send_expose (event_widget, event);
gdk_window_end_paint (event->any.window);
}
}
else
{
gtk_widget_send_expose (event_widget, event);
}
}
break;
+1 -1
View File
@@ -2590,7 +2590,7 @@ gtk_menu_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK |
attributes.event_mask |= (GDK_KEY_PRESS_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK );
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+20 -4
View File
@@ -599,8 +599,7 @@ gtk_menu_shell_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK |
GDK_KEY_PRESS_MASK |
@@ -1360,6 +1359,8 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
do
{
parent_menu_shell->priv->selection_done_coming_soon = TRUE;
g_object_ref (parent_menu_shell);
shells = g_slist_prepend (shells, parent_menu_shell);
parent_menu_shell = (GtkMenuShell*) parent_menu_shell->priv->parent_menu_shell;
@@ -1379,7 +1380,10 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
for (slist = shells; slist; slist = slist->next)
{
g_signal_emit (slist->data, menu_shell_signals[SELECTION_DONE], 0);
GtkMenuShell *parent_menu_shell = slist->data;
g_signal_emit (parent_menu_shell, menu_shell_signals[SELECTION_DONE], 0);
parent_menu_shell->priv->selection_done_coming_soon = FALSE;
g_object_unref (slist->data);
}
g_slist_free (shells);
@@ -2010,7 +2014,18 @@ gtk_menu_shell_submenu_hidden (GtkWidget *submenu,
{
GtkMenuTrackerItem *item = user_data;
gtk_menu_tracker_item_request_submenu_shown (item, FALSE);
if (!GTK_MENU_SHELL (submenu)->priv->selection_done_coming_soon)
gtk_menu_tracker_item_request_submenu_shown (item, FALSE);
}
static void
gtk_menu_shell_submenu_selection_done (GtkWidget *submenu,
gpointer user_data)
{
GtkMenuTrackerItem *item = user_data;
if (GTK_MENU_SHELL (submenu)->priv->selection_done_coming_soon)
gtk_menu_tracker_item_request_submenu_shown (item, FALSE);
}
static void
@@ -2091,6 +2106,7 @@ gtk_menu_shell_tracker_insert_func (GtkMenuTrackerItem *item,
*/
g_signal_connect (submenu, "show", G_CALLBACK (gtk_menu_shell_submenu_shown), item);
g_signal_connect (submenu, "hide", G_CALLBACK (gtk_menu_shell_submenu_hidden), item);
g_signal_connect (submenu, "selection-done", G_CALLBACK (gtk_menu_shell_submenu_selection_done), item);
}
gtk_widget_show (widget);
+5
View File
@@ -61,6 +61,11 @@ struct _GtkMenuShellPrivate
* the user moves the mouse over
* an unselectable menuitem.
*/
guint selection_done_coming_soon : 1; /* Set TRUE when a selection-done
* signal is coming soon (when checked
* from inside of a "hide" handler).
*/
GtkMnemonicHash *mnemonic_hash;
GtkKeyHash *key_hash;
+35 -23
View File
@@ -1987,6 +1987,29 @@ _gtk_notebook_get_tab_flags (GtkNotebook *notebook,
return flags;
}
static void
add_tab_position_style_class (GtkStyleContext *context,
gint tab_pos)
{
switch (tab_pos)
{
case GTK_POS_TOP:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
break;
case GTK_POS_BOTTOM:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
break;
case GTK_POS_LEFT:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
break;
case GTK_POS_RIGHT:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
break;
default:
break;
}
}
static GtkStateFlags
notebook_tab_prepare_style_context (GtkNotebook *notebook,
GtkNotebookPage *page,
@@ -2012,25 +2035,10 @@ notebook_tab_prepare_style_context (GtkNotebook *notebook,
if (use_flags && (page != NULL))
flags = _gtk_notebook_get_tab_flags (notebook, page);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_style_context_add_region (context, GTK_STYLE_REGION_TAB, flags);
switch (tab_pos)
{
case GTK_POS_TOP:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
break;
case GTK_POS_BOTTOM:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
break;
case GTK_POS_LEFT:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
break;
case GTK_POS_RIGHT:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
break;
default:
break;
}
G_GNUC_END_IGNORE_DEPRECATIONS
add_tab_position_style_class (context, tab_pos);
return state;
}
@@ -3113,7 +3121,7 @@ show_drag_window (GtkNotebook *notebook,
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
priv->drag_window = gdk_window_new (gtk_widget_get_parent_window (widget),
@@ -4595,10 +4603,12 @@ gtk_notebook_get_path_for_child (GtkContainer *container,
if (!c)
return path;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path,
gtk_widget_path_length (path) - 2,
GTK_STYLE_REGION_TAB,
_gtk_notebook_get_tab_flags (notebook, page));
G_GNUC_END_IGNORE_DEPRECATIONS
return path;
}
@@ -5276,29 +5286,26 @@ gtk_notebook_paint (GtkWidget *widget,
header_height = height;
gtk_style_context_save (context);
add_tab_position_style_class (context, tab_pos);
switch (tab_pos)
{
case GTK_POS_TOP:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
y += page->allocation.height;
height -= page->allocation.height;
header_height = page->allocation.height;
break;
case GTK_POS_BOTTOM:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
height -= page->allocation.height;
header_y += height;
header_height = page->allocation.height;
break;
case GTK_POS_LEFT:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
x += page->allocation.width;
width -= page->allocation.width;
header_width = page->allocation.width;
break;
case GTK_POS_RIGHT:
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
width -= page->allocation.width;
header_width = page->allocation.width;
header_x += width;
@@ -5398,6 +5405,9 @@ gtk_notebook_paint (GtkWidget *widget,
"has-tab-gap", &has_tab_gap,
NULL);
if (priv->show_tabs)
add_tab_position_style_class (context, tab_pos);
if (priv->show_border)
gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
@@ -6672,6 +6682,7 @@ gtk_notebook_update_tab_states (GtkNotebook *notebook)
{
GtkRegionFlags current_flags;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* FIXME: We should store these flags somewhere instead of poking
* the widget's path */
if (!gtk_widget_path_iter_has_region (gtk_widget_get_path (page->tab_label),
@@ -6680,6 +6691,7 @@ gtk_notebook_update_tab_states (GtkNotebook *notebook)
&current_flags)
|| current_flags != _gtk_notebook_get_tab_flags (notebook, page))
_gtk_widget_invalidate_style_context (page->tab_label, GTK_CSS_CHANGE_PARENT_STATE);
G_GNUC_END_IGNORE_DEPRECATIONS
}
}
}
+1 -1
View File
@@ -174,7 +174,7 @@ gtk_offscreen_window_realize (GtkWidget *widget)
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.window_type = GDK_WINDOW_OFFSCREEN;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.visual = gtk_widget_get_visual (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
+1 -1
View File
@@ -143,7 +143,7 @@ gtk_overlay_create_child_window (GtkOverlay *overlay,
attributes.y = allocation.y;
attributes.visual = gtk_widget_get_visual (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
window = gdk_window_new (gtk_widget_get_window (widget),
&attributes, attributes_mask);
+1 -1
View File
@@ -1508,7 +1508,7 @@ gtk_paned_create_child_window (GtkPaned *paned,
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.visual = gtk_widget_get_visual (widget);
if (child)
{
+1 -1
View File
@@ -535,7 +535,7 @@ special_directory_get_gicon (GUserDirectory directory)
ICON_CASE (VIDEOS);
default:
return g_themed_icon_new_with_default_fallbacks ("folder-symbolic");
return g_themed_icon_new_with_default_fallbacks (ICON_NAME_FOLDER);
}
#undef ICON_CASE
+1 -2
View File
@@ -1033,8 +1033,7 @@ gtk_plug_realize (GtkWidget *widget)
* though that will require handling "foreign" colormaps */
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_KEY_PRESS_MASK |
attributes.event_mask |= (GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK |
+5 -1
View File
@@ -153,12 +153,17 @@ static void
gtk_popover_init (GtkPopover *popover)
{
GtkWidget *widget;
GtkStyleContext *context;
widget = GTK_WIDGET (popover);
gtk_widget_set_has_window (widget, TRUE);
popover->priv = gtk_popover_get_instance_private (popover);
popover->priv->modal = TRUE;
popover->priv->apply_shape = TRUE;
context = gtk_widget_get_style_context (widget);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BACKGROUND);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_POPOVER);
}
static void
@@ -277,7 +282,6 @@ gtk_popover_realize (GtkWidget *widget)
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_EXPOSURE_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK;
+1 -2
View File
@@ -347,8 +347,7 @@ gtk_revealer_real_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask =
gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
attributes_mask = (GDK_WA_X | GDK_WA_Y) | GDK_WA_VISUAL;
priv->view_window =
+1 -1
View File
@@ -3094,7 +3094,7 @@ gtk_scrolled_window_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK |
GDK_BUTTON_MOTION_MASK | GDK_TOUCH_MASK | GDK_EXPOSURE_MASK;
GDK_BUTTON_MOTION_MASK | GDK_TOUCH_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+8 -5
View File
@@ -120,12 +120,15 @@ typedef enum
/**
* GtkPolicyType:
* @GTK_POLICY_ALWAYS: The scrollbar is always visible.
* @GTK_POLICY_AUTOMATIC: The scrollbar will appear and disappear as necessary. For example,
* when all of a #GtkTreeView can not be seen.
* @GTK_POLICY_NEVER: The scrollbar will never appear.
* @GTK_POLICY_ALWAYS: The scrollbar is always visible. The view size is
* independent of the content.
* @GTK_POLICY_AUTOMATIC: The scrollbar will appear and disappear as necessary.
* For example, when all of a #GtkTreeView can not be seen.
* @GTK_POLICY_NEVER: The scrollbar should never appear. In this mode the
* content determines the size.
*
* Determines when a scroll bar will be visible.
* Determines how the size should be computed to achieve the one of the
* visibility mode for the scrollbars.
*/
typedef enum
{
+1 -1
View File
@@ -23,7 +23,7 @@
G_BEGIN_DECLS
#define DEFAULT_THEME_NAME "Raleigh"
#define DEFAULT_THEME_NAME "Adwaita"
void _gtk_settings_set_property_value_from_rc (GtkSettings *settings,
const gchar *name,
+1 -1
View File
@@ -1073,7 +1073,7 @@ gtk_spin_button_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_ONLY;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK
attributes.event_mask |= GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_ENTER_NOTIFY_MASK
| GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
+1 -2
View File
@@ -303,8 +303,7 @@ gtk_stack_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask =
gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget);
attributes_mask = (GDK_WA_X | GDK_WA_Y) | GDK_WA_VISUAL;
priv->view_window =
+16 -99
View File
@@ -79,111 +79,18 @@
* #GtkSettings:gtk-theme-name setting or a hierarchy change in the rendered
* widget.
*
* # Transition Animations
*
* #GtkStyleContext has built-in support for state change transitions.
* Note that these animations respect the #GtkSettings:gtk-enable-animations
* setting.
*
* For simple widgets where state changes affect the whole widget area,
* calling gtk_style_context_notify_state_change() with a %NULL region
* is sufficient to trigger the transition animation. And GTK+ already
* does that when gtk_widget_set_state() or gtk_widget_set_state_flags()
* are called.
*
* If a widget needs to declare several animatable regions (i.e. not
* affecting the whole widget area), its #GtkWidget::draw signal handler
* needs to wrap the render operations for the different regions with
* calls to gtk_style_context_push_animatable_region() and
* gtk_style_context_pop_animatable_region(). These functions take an
* identifier for the region which must be unique within the style context.
* For simple widgets with a fixed set of animatable regions, using an
* enumeration works well:
*
* An example for Using an enumeration to identify animatable regions:
*
* |[<!-- language="C" -->
* enum {
* REGION_ENTRY,
* REGION_BUTTON_UP,
* REGION_BUTTON_DOWN
* };
*
* ...
*
* gboolean
* spin_button_draw (GtkWidget *widget,
* cairo_t *cr)
* {
* GtkStyleContext *context;
*
* context = gtk_widget_get_style_context (widget);
*
* gtk_style_context_push_animatable_region (context,
* GUINT_TO_POINTER (REGION_ENTRY));
*
* gtk_render_background (cr, 0, 0, 100, 30);
* gtk_render_frame (cr, 0, 0, 100, 30);
*
* gtk_style_context_pop_animatable_region (context);
*
* ...
* }
* ]|
*
* For complex widgets with an arbitrary number of animatable regions, it
* is up to the implementation to come up with a way to uniquely identify
* each animatable region. Using pointers to internal structs is one way
* to achieve this:
*
* An example for using struct pointers to identify animatable regions:
* |[<!-- language="C" -->
* void
* notebook_draw_tab (GtkWidget *widget,
* NotebookPage *page,
* cairo_t *cr)
* {
* gtk_style_context_push_animatable_region (context, page);
* gtk_render_extension (cr, page->x, page->y, page->width, page->height);
* gtk_style_context_pop_animatable_region (context);
* }
* ]|
*
* The widget also needs to notify the style context about a state change
* for a given animatable region so the animation is triggered.
*
* An example for triggering a state change animation on a region:
* |[<!-- language="C" -->
* gboolean
* notebook_motion_notify (GtkWidget *widget,
* GdkEventMotion *event)
* {
* GtkStyleContext *context;
* NotebookPage *page;
*
* context = gtk_widget_get_style_context (widget);
* page = find_page_under_pointer (widget, event);
* gtk_style_context_notify_state_change (context,
* gtk_widget_get_window (widget),
* page,
* GTK_STATE_PRELIGHT,
* TRUE);
* ...
* }
* ]|
*
* gtk_style_context_notify_state_change() accepts %NULL region IDs as a
* special value, in this case, the whole widget area will be updated
* by the animation.
*
* # Style Classes and Regions # {#gtkstylecontext-classes}
* # Style Classes # {#gtkstylecontext-classes}
*
* Widgets can add style classes to their context, which can be used
* to associate different styles by class
* (see [Selectors][gtkcssprovider-selectors]).
* Theme engines can also use style classes to vary their rendering.
*
* Widgets can also add regions with flags to their context.
* # Style Regions
*
* Widgets can also add regions with flags to their context. This feature is
* deprecated and will be removed in a future GTK+ update. Please use style
* classes instead.
*
* The regions used by GTK+ widgets are:
*
@@ -823,9 +730,11 @@ create_query_path (GtkStyleContext *context,
GtkRegion *region;
region = &g_array_index (info->regions, GtkRegion, i);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path, pos,
g_quark_to_string (region->class_quark),
region->flags);
G_GNUC_END_IGNORE_DEPRECATIONS
}
/* Set widget classes */
@@ -1920,6 +1829,8 @@ gtk_style_context_list_classes (GtkStyleContext *context)
* itself with g_list_free() when you are done with it.
*
* Since: 3.0
*
* Deprecated: 3.14
**/
GList *
gtk_style_context_list_regions (GtkStyleContext *context)
@@ -1999,6 +1910,8 @@ _gtk_style_context_check_region_name (const gchar *str)
* and -, starting always with a lowercase letter.
*
* Since: 3.0
*
* Deprecated: 3.14
**/
void
gtk_style_context_add_region (GtkStyleContext *context,
@@ -2040,6 +1953,8 @@ gtk_style_context_add_region (GtkStyleContext *context,
* Removes a region from @context.
*
* Since: 3.0
*
* Deprecated: 3.14
**/
void
gtk_style_context_remove_region (GtkStyleContext *context,
@@ -2083,6 +1998,8 @@ gtk_style_context_remove_region (GtkStyleContext *context,
* Returns: %TRUE if region is defined
*
* Since: 3.0
*
* Deprecated: 3.14
**/
gboolean
gtk_style_context_has_region (GtkStyleContext *context,
+13 -4
View File
@@ -796,6 +796,15 @@ struct _GtkStyleContextClass
*/
#define GTK_STYLE_CLASS_DESTRUCTIVE_ACTION "destructive-action"
/**
* GTK_STYLE_CLASS_POPOVER:
*
* A CSS class that matches popovers. Used by #GtkPopover.
*
* Since: 3.14
*/
#define GTK_STYLE_CLASS_POPOVER "popover"
/* Predefined set of widget regions */
/**
@@ -930,17 +939,17 @@ GDK_AVAILABLE_IN_ALL
gboolean gtk_style_context_has_class (GtkStyleContext *context,
const gchar *class_name);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
GList * gtk_style_context_list_regions (GtkStyleContext *context);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_style_context_add_region (GtkStyleContext *context,
const gchar *region_name,
GtkRegionFlags flags);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_style_context_remove_region (GtkStyleContext *context,
const gchar *region_name);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_style_context_has_region (GtkStyleContext *context,
const gchar *region_name,
GtkRegionFlags *flags_return);
+13 -2
View File
@@ -245,7 +245,10 @@ gtk_switch_enter (GtkWidget *widget,
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
if (event->window == priv->event_window)
priv->in_switch = TRUE;
{
priv->in_switch = TRUE;
gtk_widget_queue_draw (widget);
}
return FALSE;
}
@@ -257,7 +260,10 @@ gtk_switch_leave (GtkWidget *widget,
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
if (event->window == priv->event_window)
priv->in_switch = FALSE;
{
priv->in_switch = FALSE;
gtk_widget_queue_draw (widget);
}
return FALSE;
}
@@ -464,9 +470,14 @@ gtk_switch_paint_handle (GtkWidget *widget,
cairo_t *cr,
GdkRectangle *box)
{
GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkStateFlags state = gtk_widget_get_state_flags (widget);
gtk_style_context_save (context);
if (priv->in_switch)
state |= GTK_STATE_FLAG_PRELIGHT;
gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SLIDER);
gtk_render_slider (context, cr,
+39 -3
View File
@@ -4241,7 +4241,7 @@ gtk_text_view_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
@@ -5326,6 +5326,38 @@ draw_text (cairo_t *cr,
gtk_text_view_paint (widget, cr);
}
static void
paint_border_window (GtkTextView *text_view,
cairo_t *cr,
GtkTextWindowType type,
GtkStyleContext *context,
const char *class)
{
GdkWindow *window;
window = gtk_text_view_get_window (text_view, type);
if (window != NULL &&
gtk_cairo_should_draw_window (cr, window))
{
gint w, h;
gtk_style_context_save (context);
gtk_style_context_add_class (context, class);
w = gdk_window_get_width (window);
h = gdk_window_get_height (window);
gtk_cairo_transform_to_window (cr, GTK_WIDGET (text_view), window);
cairo_save (cr);
gtk_render_background (context, cr, 0, 0, w, h);
cairo_restore (cr);
gtk_style_context_restore (context);
}
}
static gboolean
gtk_text_view_draw (GtkWidget *widget,
cairo_t *cr)
@@ -5378,6 +5410,11 @@ gtk_text_view_draw (GtkWidget *widget,
cairo_restore (cr);
}
paint_border_window (GTK_TEXT_VIEW (widget), cr, GTK_TEXT_WINDOW_LEFT, context, GTK_STYLE_CLASS_LEFT);
paint_border_window (GTK_TEXT_VIEW (widget), cr, GTK_TEXT_WINDOW_RIGHT, context, GTK_STYLE_CLASS_RIGHT);
paint_border_window (GTK_TEXT_VIEW (widget), cr, GTK_TEXT_WINDOW_TOP, context, GTK_STYLE_CLASS_TOP);
paint_border_window (GTK_TEXT_VIEW (widget), cr, GTK_TEXT_WINDOW_BOTTOM, context, GTK_STYLE_CLASS_BOTTOM);
/* Propagate exposes to all unanchored children.
* Anchored children are handled in gtk_text_view_paint().
*/
@@ -9253,8 +9290,7 @@ text_window_realize (GtkTextWindow *win,
attributes.y = 0;
attributes.width = win->allocation.width;
attributes.height = win->allocation.height;
attributes.event_mask = (GDK_EXPOSURE_MASK |
GDK_SCROLL_MASK |
attributes.event_mask = (GDK_SCROLL_MASK |
GDK_SMOOTH_SCROLL_MASK |
GDK_KEY_PRESS_MASK |
GDK_BUTTON_PRESS_MASK |
+4
View File
@@ -648,6 +648,8 @@ gtk_theming_engine_has_class (GtkThemingEngine *engine,
* Returns: %TRUE if region is defined
*
* Since: 3.0
*
* Deprecated: 3.14
**/
gboolean
gtk_theming_engine_has_region (GtkThemingEngine *engine,
@@ -662,7 +664,9 @@ gtk_theming_engine_has_region (GtkThemingEngine *engine,
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), FALSE);
priv = engine->priv;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gtk_style_context_has_region (priv->context, style_region, flags);
G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
+1 -1
View File
@@ -232,7 +232,7 @@ const GtkWidgetPath * gtk_theming_engine_get_path (GtkThemingEngine *engine);
GDK_AVAILABLE_IN_ALL
gboolean gtk_theming_engine_has_class (GtkThemingEngine *engine,
const gchar *style_class);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_theming_engine_has_region (GtkThemingEngine *engine,
const gchar *style_region,
GtkRegionFlags *flags);
+1 -1
View File
@@ -1232,7 +1232,7 @@ gtk_tool_item_group_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK
| GDK_VISIBILITY_NOTIFY_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_BUTTON_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+1 -1
View File
@@ -731,7 +731,7 @@ gtk_tool_palette_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK
| GDK_VISIBILITY_NOTIFY_MASK
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_BUTTON_MOTION_MASK
| GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK
-26
View File
@@ -355,27 +355,6 @@ gtk_tray_icon_draw (GtkWidget *widget,
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
}
else
{
GdkRectangle clip;
if (gdk_cairo_get_clip_rectangle (cr, &clip))
{
/* Clear to parent-relative pixmap
* We need to use direct X access here because GDK doesn't know about
* the parent realtive pixmap. */
cairo_surface_flush (target);
XClearArea (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
clip.x, clip.y,
clip.width, clip.height,
False);
cairo_surface_mark_dirty_rectangle (target,
clip.x, clip.y,
clip.width, clip.height);
}
}
if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->draw)
retval = GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->draw (widget, cr);
@@ -501,11 +480,6 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
icon->priv->manager_visual_rgba = FALSE;
}
/* For the background-relative hack we use when we aren't
* using a real RGBA visual, we can't be double-buffered
*/
gtk_widget_set_double_buffered (GTK_WIDGET (icon), icon->priv->manager_visual_rgba);
if (type != None)
XFree (prop.prop);
}
+14 -26
View File
@@ -2438,8 +2438,7 @@ gtk_tree_view_realize (GtkWidget *widget)
attributes.y = gtk_tree_view_get_effective_header_height (tree_view);
attributes.width = MAX (tree_view->priv->width, allocation.width);
attributes.height = allocation.height;
attributes.event_mask = (GDK_EXPOSURE_MASK |
GDK_SCROLL_MASK |
attributes.event_mask = (GDK_SCROLL_MASK |
GDK_SMOOTH_SCROLL_MASK |
GDK_POINTER_MOTION_MASK |
GDK_ENTER_NOTIFY_MASK |
@@ -2461,8 +2460,7 @@ gtk_tree_view_realize (GtkWidget *widget)
attributes.y = 0;
attributes.width = MAX (tree_view->priv->width, allocation.width);
attributes.height = tree_view->priv->header_height;
attributes.event_mask = (GDK_EXPOSURE_MASK |
GDK_SCROLL_MASK |
attributes.event_mask = (GDK_SCROLL_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -3951,7 +3949,7 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
width = attributes.width = drag_allocation.width;
height = attributes.height = drag_allocation.height;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
tree_view->priv->drag_highlight_window = gdk_window_new (tree_view->priv->header_window, &attributes, attributes_mask);
gtk_widget_register_window (GTK_WIDGET (tree_view), tree_view->priv->drag_highlight_window);
@@ -4011,7 +4009,7 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = x;
attributes.y = y;
@@ -4092,7 +4090,7 @@ gtk_tree_view_motion_draw_column_motion_arrow (GtkTreeView *tree_view)
attributes.window_type = GDK_WINDOW_TEMP;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes.x = x;
attributes.y = y;
@@ -4553,7 +4551,6 @@ gtk_tree_view_update_rubber_band (GtkTreeView *tree_view)
gdouble start_x, start_y, offset_x, offset_y, x, y;
GdkRectangle old_area;
GdkRectangle new_area;
GdkRectangle common;
cairo_region_t *invalid_region;
gint bin_x, bin_y;
@@ -4584,23 +4581,6 @@ gtk_tree_view_update_rubber_band (GtkTreeView *tree_view)
invalid_region = cairo_region_create_rectangle (&old_area);
cairo_region_union_rectangle (invalid_region, &new_area);
gdk_rectangle_intersect (&old_area, &new_area, &common);
if (common.width > 2 && common.height > 2)
{
cairo_region_t *common_region;
/* make sure the border is invalidated */
common.x += 1;
common.y += 1;
common.width -= 2;
common.height -= 2;
common_region = cairo_region_create_rectangle (&common);
cairo_region_subtract (invalid_region, common_region);
cairo_region_destroy (common_region);
}
gdk_window_invalidate_region (tree_view->priv->bin_window, invalid_region, TRUE);
cairo_region_destroy (invalid_region);
@@ -5206,8 +5186,10 @@ gtk_tree_view_bin_draw (GtkWidget *widget,
gtk_style_context_set_state (context, state);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_CELL);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_style_context_add_region (context, GTK_STYLE_REGION_ROW, row_flags);
gtk_style_context_add_region (context, GTK_STYLE_REGION_COLUMN, column_flags);
G_GNUC_END_IGNORE_DEPRECATIONS
if (node == tree_view->priv->cursor_node && has_can_focus_cell
&& ((column == tree_view->priv->focus_column
@@ -8767,7 +8749,9 @@ gtk_tree_view_get_path_for_child (GtkContainer *container,
if (!list->next)
flags |= GTK_REGION_LAST;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path, gtk_widget_path_length (path) - 2, GTK_STYLE_REGION_COLUMN_HEADER, flags);
G_GNUC_END_IGNORE_DEPRECATIONS
break;
}
g_list_free (visible_columns);
@@ -10000,7 +9984,7 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
attributes.width = button_allocation.width;
attributes.height = button_allocation.height;
attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view));
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK;
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
tree_view->priv->drag_window = gdk_window_new (tree_view->priv->header_window,
@@ -14592,7 +14576,9 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_style_context_add_region (context, GTK_STYLE_REGION_COLUMN, 0);
G_GNUC_END_IGNORE_DEPRECATIONS
gtk_widget_style_get (widget,
"allow-rules", &allow_rules,
@@ -14607,7 +14593,9 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
else
row_flags = GTK_REGION_EVEN;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_style_context_add_region (context, GTK_STYLE_REGION_ROW, row_flags);
G_GNUC_END_IGNORE_DEPRECATIONS
}
is_separator = row_is_separator (tree_view, &iter, NULL);
+1 -1
View File
@@ -741,7 +741,7 @@ gtk_viewport_realize (GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
event_mask = gtk_widget_get_events (widget);
attributes.event_mask = event_mask | GDK_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SMOOTH_SCROLL_MASK;
+10 -1
View File
@@ -1369,6 +1369,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* Whether the widget is double buffered.
*
* Since: 2.18
*
* Deprecated: 3.14: Widgets should not use this property.
*/
g_object_class_install_property (gobject_class,
PROP_DOUBLE_BUFFERED,
@@ -1376,7 +1378,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
P_("Double Buffered"),
P_("Whether the widget is double buffered"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED));
/**
* GtkWidget:halign:
@@ -3811,7 +3813,9 @@ gtk_widget_set_property (GObject *object,
gtk_widget_queue_tooltip_query (widget);
break;
case PROP_DOUBLE_BUFFERED:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_set_double_buffered (widget, g_value_get_boolean (value));
G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_HALIGN:
gtk_widget_set_halign (widget, g_value_get_enum (value));
@@ -3975,7 +3979,9 @@ gtk_widget_get_property (GObject *object,
g_value_set_object (value, gtk_widget_get_window (widget));
break;
case PROP_DOUBLE_BUFFERED:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_value_set_boolean (value, gtk_widget_get_double_buffered (widget));
G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_HALIGN:
g_value_set_enum (value, gtk_widget_get_halign (widget));
@@ -9229,6 +9235,9 @@ gtk_widget_get_app_paintable (GtkWidget *widget)
*
* Since 3.10 this function only works for widgets with native
* windows.
*
* Deprecated: 3.14: This does not work under non-X11 backends,
* and it should not be used in newly written code.
**/
void
gtk_widget_set_double_buffered (GtkWidget *widget,
+2 -2
View File
@@ -892,10 +892,10 @@ void gtk_widget_set_app_paintable (GtkWidget *widget,
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_get_app_paintable (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_widget_set_double_buffered (GtkWidget *widget,
gboolean double_buffered);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_widget_get_double_buffered (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
+14
View File
@@ -981,6 +981,8 @@ gtk_widget_path_iter_has_class (const GtkWidgetPath *path,
* and -, starting always with a lowercase letter.
*
* Since: 3.0
*
* Deprecated: 3.14: The use of regions is deprecated.
**/
void
gtk_widget_path_iter_add_region (GtkWidgetPath *path,
@@ -1020,6 +1022,8 @@ gtk_widget_path_iter_add_region (GtkWidgetPath *path,
* the hierarchy defined in @path.
*
* Since: 3.0
*
* Deprecated: 3.14: The use of regions is deprecated.
**/
void
gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
@@ -1056,6 +1060,8 @@ gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
* hierarchy defined in @path.
*
* Since: 3.0
*
* Deprecated: 3.14: The use of regions is deprecated.
**/
void
gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
@@ -1089,6 +1095,8 @@ gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
* free the list itself.
*
* Since: 3.0
*
* Deprecated: 3.14: The use of regions is deprecated.
**/
GSList *
gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
@@ -1136,6 +1144,8 @@ gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
* Returns: %TRUE if the widget at @pos has the region defined.
*
* Since: 3.0
*
* Deprecated: 3.14: The use of regions is deprecated.
**/
gboolean
gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
@@ -1182,6 +1192,8 @@ gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
* Returns: %TRUE if the class @name is defined for the widget at @pos
*
* Since: 3.0
*
* Deprecated: 3.14: The use of regions is deprecated.
**/
gboolean
gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
@@ -1203,7 +1215,9 @@ gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
if (qname == 0)
return FALSE;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gtk_widget_path_iter_has_qregion (path, pos, qname, flags);
G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
+6 -6
View File
@@ -119,29 +119,29 @@ gboolean gtk_widget_path_iter_has_qclass (const GtkWidgetPath *path,
gint pos,
GQuark qname);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_widget_path_iter_add_region (GtkWidgetPath *path,
gint pos,
const gchar *name,
GtkRegionFlags flags);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
gint pos,
const gchar *name);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
void gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
gint pos);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
GSList * gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
gint pos);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
gint pos,
const gchar *name,
GtkRegionFlags *flags);
GDK_AVAILABLE_IN_ALL
GDK_DEPRECATED_IN_3_14
gboolean gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
gint pos,
GQuark qname,
+1 -2
View File
@@ -219,8 +219,7 @@ gtk_win32_embed_widget_realize (GtkWidget *widget)
* though that will require handling "foreign" colormaps */
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_KEY_PRESS_MASK |
attributes.event_mask |= (GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK |
GDK_LEAVE_NOTIFY_MASK |
+4 -7
View File
@@ -6171,8 +6171,7 @@ popover_realize (GtkWidget *widget,
attributes.width = rect.width;
attributes.height = rect.height;
attributes.visual = gtk_widget_get_visual (widget);
attributes.event_mask = gtk_widget_get_events (popover->widget) |
GDK_EXPOSURE_MASK;
attributes.event_mask = gtk_widget_get_events (popover->widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
parent_window = gtk_widget_get_window (GTK_WIDGET (window));
@@ -6216,7 +6215,7 @@ gtk_window_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_STRUCTURE_MASK;
attributes.visual = gtk_widget_get_visual (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
@@ -6290,8 +6289,7 @@ gtk_window_realize (GtkWidget *widget)
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON_MOTION_MASK |
GDK_KEY_PRESS_MASK |
@@ -6328,7 +6326,7 @@ gtk_window_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_STRUCTURE_MASK;
attributes.visual = gtk_widget_get_visual (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
@@ -7505,7 +7503,6 @@ resize_grip_create_window (GtkWindow *window)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.event_mask = gtk_widget_get_events (widget) |
GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y;
+1 -5
View File
@@ -185,11 +185,7 @@ init_theme (GtkInspectorVisual *vis)
gchar *themedir = get_data_path ("themes");
t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
#ifdef G_OS_WIN32
g_hash_table_add (t, g_strdup ("gtk-win32"));
#else
g_hash_table_add (t, g_strdup ("Raleigh"));
#endif
g_hash_table_add (t, g_strdup ("Adwaita"));
fill_gtk (themedir, t);

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 275 B

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 692 B

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 715 B

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 755 B

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 753 B

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 756 B

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 751 B

Some files were not shown because too many files have changed in this diff Show More