]> Pileus Git - ~andy/gtk/log
~andy/gtk
11 years agoGdkFrameClockIdle: don't start the tiemout/idle when in a frame
Owen W. Taylor [Wed, 14 Nov 2012 18:26:13 +0000 (13:26 -0500)]
GdkFrameClockIdle: don't start the tiemout/idle when in a frame

Don't start the idle if we're in the middle of painting a frame -
this will prevent us from getting the timing right when starting
the idle after the frame.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoAdd GdkFrameHistory and GdkFrameTimings, handle _NET_WM_FRAME_TIMINGS
Owen W. Taylor [Wed, 14 Nov 2012 17:49:06 +0000 (12:49 -0500)]
Add GdkFrameHistory and GdkFrameTimings, handle _NET_WM_FRAME_TIMINGS

In order to be able to track statistics about how well we are drawing,
and in order to be able to do sophisticated things with frame timing
like predicting per-frame latencies and synchronizing audio with video,
we need to be able to track exactly when previous frames were drawn
to the screen.

Information about each frame is stored in a new GdkFrameTimings object.
A new GdkFrameHistory object is added which keeps a queue of recent
GdkFrameTimings (this is added to avoid further complicating the
implementation of GdkFrameClock.)

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkWindowX11: Only start a frame when we emit damage
Owen W. Taylor [Wed, 14 Nov 2012 17:23:41 +0000 (12:23 -0500)]
GdkWindowX11: Only start a frame when we emit damage

Instead of communicating the start of a frame to the window manager
as soon as we begin a frame, start a frame only when we know we've
actually created damage to the contents of a window.

(This uses cairo_set_mime_data() as a notification mechanism - a
clever suggestion from Uli Schlachter.)

The advantage of this is that we aren't forcing the compositor to
do a frame cycle and send _NET_WM_FRAME_DRAWN - depending on how the
compositor is structured that might either cause it to do extra
work or it might send _NET_WM_FRAME_DRAWN early and upset frame
timing.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkDisplay: handle multiple calls to _gdk_display_pause_events()
Owen W. Taylor [Sun, 7 Oct 2012 18:13:56 +0000 (14:13 -0400)]
GdkDisplay: handle multiple calls to _gdk_display_pause_events()

Since events can be paused independently for each window during processing,
make _gdk_display_pause_events() count how many times it is called
and only unpause when unpause_events() is called the same number of
times.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agogdk_display_get_event: don't unqueue events from the windowing system when paused
Owen W. Taylor [Sun, 7 Oct 2012 15:47:49 +0000 (11:47 -0400)]
gdk_display_get_event: don't unqueue events from the windowing system when paused

Unqueuing events from the windowing system when paused could result
in weird reordering if event filters resulted in application-visible
behavior. Since we now resume events when the frame clock is frozen,
we now no longer count on low-level event handling running while
event handling is paused.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkFrameClock: Reverse order of resume-events and afterpaint
Owen W. Taylor [Sun, 7 Oct 2012 15:42:45 +0000 (11:42 -0400)]
GdkFrameClock: Reverse order of resume-events and afterpaint

Keeping events paused after the end of a frame put us in a
weird state where we had to process and queue events - so that
we would get the message from the compositor - but not deliver
them. Instead resume events before ending the frame.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoCompress motion synchronized with the paint cycle
Owen W. Taylor [Wed, 26 Sep 2012 14:28:06 +0000 (10:28 -0400)]
Compress motion synchronized with the paint cycle

When we have pending motion events, instead of delivering them
directly, request the new FLUSH_EVENTS phase of the frame clock.
This allows us to compress repeated motion events sent to the
same window.

In the FLUSH_EVENTS phase, which occur at priority GDK_PRIORITY_EVENTS + 1,
we deliver any pending motion events then turn off event delivery
until the end of the next frame. Turning off event delivery means
that we'll reliably paint the compressed motion events even if more
have arrived.

Add a motion-compression test case which demonstrates behavior when
an application takes too long handle motion events. It is unusable
without this patch but behaves fine with the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGtkScrolledWindow: use GdkFrameClock for kinetic scrolling
Owen W. Taylor [Tue, 2 Oct 2012 23:54:15 +0000 (19:54 -0400)]
GtkScrolledWindow: use GdkFrameClock for kinetic scrolling

Use GdkFrameClock when animating scrolling via touch, rather
than a timeout.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoAdd a test of an animated resizing window
Owen W. Taylor [Tue, 18 Sep 2012 22:21:08 +0000 (18:21 -0400)]
Add a test of an animated resizing window

Add a test of a window with an animated size and contents. The
test accepts load factor command line argument to see how things
work as the drawing of the content requires more GPU resources.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGtkTimeline: Wrap around the progress correctly when looping
Owen W. Taylor [Fri, 28 Sep 2012 16:38:14 +0000 (12:38 -0400)]
GtkTimeline: Wrap around the progress correctly when looping

When we have a looping animation for something like an angle,
we need to make sure that the distance we go past 1.0 becomes
the starting distance for the next frame. This prevents a
stutter at the loop position.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGtkTimeline: introspection fixes, add :progress-type property
Owen W. Taylor [Thu, 27 Sep 2012 21:05:22 +0000 (17:05 -0400)]
GtkTimeline: introspection fixes, add :progress-type property

Fix up introspection information for GtkTimeline, install the
header has a public heaer, and add the property for :progress-type.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoHook GtkTimeline up to GdkFrameClock
Owen W. Taylor [Thu, 27 Sep 2012 20:27:36 +0000 (16:27 -0400)]
Hook GtkTimeline up to GdkFrameClock

Use GdkFrameClock for the timing of GtkTimeline. This require the
user to provide either a GtkWidget or a GdkFrameClock when creating
the timeline. The default constructor now takes a GtkWidget. If you
want to create a GdkFrameClock without a widget, you need to use
g_object_new() and pass in a GdkFrameClock and GdkScreen.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGtkTimeline: remove settable FPS
Owen W. Taylor [Thu, 10 Nov 2011 23:01:44 +0000 (18:01 -0500)]
GtkTimeline: remove settable FPS

The frames-per-second for an animation should be controlled by how
fast we can process frames and the the frame-rate of the display; it's not
a meaningful app-settable property.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoAdd back GtkTimeline
Owen W. Taylor [Fri, 27 Jul 2012 08:56:51 +0000 (04:56 -0400)]
Add back GtkTimeline

Add back the GtkTimeline code that previously made private and
then removed. It will be hooked up to GdkFrameClock. This commit
purely adds the old code back.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoAdd an UPDATE phase and GdkFrameClockTarget, use for GtkStyleContext
Owen W. Taylor [Wed, 26 Sep 2012 19:44:30 +0000 (15:44 -0400)]
Add an UPDATE phase and GdkFrameClockTarget, use for GtkStyleContext

Switch GtkStyleContext to using GdkFrameClock. To do this, add a new
UPDATE phase to GdkFrameClock.

Add a GdkFrameClockTarget interface with a single set_clock() method,
and use this to deal with the fact that GtkWidget only has a frame
clock when realized.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkFrameClockIdle: add throttling to 60fps
Owen W. Taylor [Thu, 27 Sep 2012 21:55:55 +0000 (17:55 -0400)]
GdkFrameClockIdle: add throttling to 60fps

If the backend is throttling paints, then the frame clock will be
frozen at the end of the frame. If not, then we need to add throttling,
so wait until 16ms after the start of the frame before beginning the
next frame.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkWindowX11: start off with an odd frame-counter value
Owen W. Taylor [Thu, 4 Oct 2012 00:15:44 +0000 (20:15 -0400)]
GdkWindowX11: start off with an odd frame-counter value

By starting with an odd frame counter value, we make the mapping
and initial paint of the window an atomic operation, avoiding
any visual artifacts from an unpainted window.

Possible improvement: start the frame when doing gdk_window_show(),
so that the same improvement occurs for windows that were previously
shown and are being mapped again.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoFreeze the update counter for unmapped windows
Owen W. Taylor [Thu, 4 Oct 2012 00:13:42 +0000 (20:13 -0400)]
Freeze the update counter for unmapped windows

When a window is unmapped, freeze its frame clock. This avoids doing
unnecessary work, but also means that we won't block waiting for
_NET_WM_FRAME_DRAWN messages that will never be received since the
frame ended while the window was withdrawn.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoUse _NET_WM_FRAME_DRAWN to synchronize frame drawing
Owen W. Taylor [Tue, 18 Sep 2012 13:37:03 +0000 (09:37 -0400)]
Use _NET_WM_FRAME_DRAWN to synchronize frame drawing

As part of the extended _NET_WM_SYNC_REQUEST_COUNTER protocol,
we get a _NET_WM_FRAME_DRAWN message for each frame we draw. Use this
to synchronize the updates we are doing with the compositing manager's
drawing, and ultimately with with display refresh.

We now set the sync request counters on all windows, including
override-redirect windows, since it is also useful to do synchronized,
atomic updates for such windows.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoSwitch to an extended form of _NET_WM_SYNC_REQUEST_COUNTER
Owen W. Taylor [Tue, 18 Sep 2012 13:31:17 +0000 (09:31 -0400)]
Switch to an extended form of _NET_WM_SYNC_REQUEST_COUNTER

By exporting two XSync counters on a toplevel window, we subscribe
to an extended form of the _NET_WM_SYNC_REQUEST_COUNTER protocol,
where the window manager can initiate an atomic frame, as previously,
but the application can also do so by incrementing the new counter to
an odd value, and then to an even value to finish the frame.

See:
https://mail.gnome.org/archives/wm-spec-list/2011-October/msg00006.html

The support for 64-bit integers that GLib requires is used to
simplify the logic.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkFrameClock: add freeze/thaw
Owen W. Taylor [Wed, 3 Oct 2012 23:42:13 +0000 (19:42 -0400)]
GdkFrameClock: add freeze/thaw

Add the ability to freeze a frame clock, which pauses its operation,
then thaw it again later to resume.

Initially this is used to implement freezing updates when we are
waiting for ConfigureNotify in response to changing the size of
a toplevel.

We need a per-window clock for this to work properly, so add that
for the X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkFrameClock: Make the phase explicit when requesting the frame
Owen W. Taylor [Wed, 3 Oct 2012 23:38:40 +0000 (19:38 -0400)]
GdkFrameClock: Make the phase explicit when requesting the frame

Instead of having gdk_frame_clock_request_frame() have
gdk_frame_clock_request_phase() where we can say what phase we need.
This allows us to know if we get a frame-request during layout whether
it's just a request for drawing from the layout, or whether another
layout phase is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoUse GdkFrameClock for relayout
Owen W. Taylor [Tue, 18 Sep 2012 13:00:57 +0000 (09:00 -0400)]
Use GdkFrameClock for relayout

Add a ::layout signal to GdkFrameClock and use it instead of an idle
handler to drive the restyling and relayout of containers.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoAdd GdkFrameClock
Owen W. Taylor [Wed, 3 Oct 2012 22:34:01 +0000 (18:34 -0400)]
Add GdkFrameClock

Add an object GdkFrameClock that we associate with a GdkWindow.
This tracks when the window needs to be repainted, and will also
be used for other operations in the future like relayout and
updating animations.

Based on a patch from Havoc Pennington:

 https://mail.gnome.org/archives/gtk-devel-list/2010-October/msg00004.html

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agoGdkDisplayX11: Don't use substructure events in internal accounting
Owen W. Taylor [Wed, 19 Sep 2012 02:13:06 +0000 (22:13 -0400)]
GdkDisplayX11: Don't use substructure events in internal accounting

We may receive events because SubstructureNotifyMask has been selected
for the root window. (Most likely, this would occur because GTK+
is being used inside a window manager like Metacity or Mutter.)
This can confuse various types of internal accounting, so detect
such events and comprehensively ignore them for GDK's internal
purposes. We still need to generate GDK events for these cases
because you can select for substructure events with
GDK_SUBSTRUCTURE_MASK.

https://bugzilla.gnome.org/show_bug.cgi?id=685460

11 years agogtk3-demo: Fix up resource handling
Alexander Larsson [Thu, 14 Feb 2013 22:01:19 +0000 (23:01 +0100)]
gtk3-demo: Fix up resource handling

We're not loading css files via resouce uris, as we want
to support editing, so we need to use absolute references
to any included resources.

11 years agoAdd new GtkIconInfo calls to the reference docs
Alexander Larsson [Thu, 14 Feb 2013 21:54:39 +0000 (22:54 +0100)]
Add new GtkIconInfo calls to the reference docs

11 years agoUpdate README.in for the GtkIconInfo type change
Alexander Larsson [Thu, 14 Feb 2013 21:52:49 +0000 (22:52 +0100)]
Update README.in for the GtkIconInfo type change

11 years agoGtkIconTheme: Add async versions of symbolic icon loaders
Alexander Larsson [Thu, 14 Feb 2013 15:01:04 +0000 (16:01 +0100)]
GtkIconTheme: Add async versions of symbolic icon loaders

https://bugzilla.gnome.org/show_bug.cgi?id=693802

11 years agoGtkIconTheme Don't leak pixbuf in symbolic icon cache
Alexander Larsson [Thu, 14 Feb 2013 13:58:02 +0000 (14:58 +0100)]
GtkIconTheme Don't leak pixbuf in symbolic icon cache

We need to unref the pixbuf we just put in the cache, because
symbolic_pixbuf_cache_new takes a ref.

https://bugzilla.gnome.org/show_bug.cgi?id=693802

11 years agoAdd gtk_icon_info_load_icon_async
Alexander Larsson [Thu, 14 Feb 2013 12:32:30 +0000 (13:32 +0100)]
Add gtk_icon_info_load_icon_async

This lets you asynchronously load icons. We need this for gnome-shell
to replace its current non-threadsafe use of GtkIconTheme.

https://bugzilla.gnome.org/show_bug.cgi?id=693802

11 years agoMake GtkIconInfo a GObject
Alexander Larsson [Wed, 13 Feb 2013 14:05:02 +0000 (15:05 +0100)]
Make GtkIconInfo a GObject

This is necessary in order to have async operations on it.
All the old copy/free functions keeps working, and g_boxed_copy on a GObject
also works, so this should be mostly compatible, but techncally its a minor
ABI break since the GType changes fundamental type. Changes like this has
happened before though, like with GVariant becomming its own fundamental
type.

https://bugzilla.gnome.org/show_bug.cgi?id=693802

11 years agoRevert "Updated Malayalam Localization"
Anish A [Thu, 14 Feb 2013 19:10:04 +0000 (23:10 +0400)]
Revert "Updated Malayalam Localization"

This reverts commit bff9de1adcb4ddef53d52fb1f296be35c2cda16b.

11 years agoUpdated Malayalam Localization
Anish A [Thu, 14 Feb 2013 19:08:33 +0000 (23:08 +0400)]
Updated Malayalam Localization

11 years agowayland: Add support for output device removal
Rob Bradford [Thu, 14 Feb 2013 13:28:07 +0000 (13:28 +0000)]
wayland: Add support for output device removal

Since we only receive an object id for the removed object we must try and
remove that from the list of devices based on that id.

11 years agowayland: Add basic multiple output support
Rob Bradford [Thu, 14 Feb 2013 13:00:19 +0000 (13:00 +0000)]
wayland: Add basic multiple output support

Store the wl_output pointer within the the GdkWaylandMonitor structure.

11 years agofilechooserbutton: Add tests for SELECT_FOLDER mode with the dialog active
Federico Mena Quintero [Wed, 13 Feb 2013 21:21:12 +0000 (15:21 -0600)]
filechooserbutton: Add tests for SELECT_FOLDER mode with the dialog active

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Oops, cancel a file operation that was missing
Federico Mena Quintero [Wed, 13 Feb 2013 21:07:33 +0000 (15:07 -0600)]
filechooser: Oops, cancel a file operation that was missing

In addition, remove a list of pending_cancellables that was no longer being used.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: Add a battery of tests for GtkFileChooserButton
Federico Mena Quintero [Wed, 13 Feb 2013 19:42:38 +0000 (13:42 -0600)]
filechooserbutton: Add a battery of tests for GtkFileChooserButton

These are generic tests that can test the button in all of its modes,
instead of hand-written tests for each combination.

Some tests fail currently.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: In SELECT_FOLDER mode, consider an empty selection to mean current...
Federico Mena Quintero [Wed, 13 Feb 2013 18:12:50 +0000 (12:12 -0600)]
filechooserbutton: In SELECT_FOLDER mode, consider an empty selection to mean current_folder

If the user didn't explicitly select anything, BUT the file chooser button has
a current_folder set, do the same as what GtkFileChooserDefault would do:
return the current folder as the selection.

This makes the tests in tests/filechooser pass!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: Keep track of the current_folder while the dialog is inactive
Federico Mena Quintero [Wed, 13 Feb 2013 17:47:35 +0000 (11:47 -0600)]
filechooserbutton: Keep track of the current_folder while the dialog is inactive

This is analogous to keeping the selection while the dialog is inactive.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Fix cast
Federico Mena Quintero [Wed, 13 Feb 2013 17:14:36 +0000 (11:14 -0600)]
filechooser: Fix cast

11 years agofilechooserbutton: Remove unused function prototypes
Federico Mena Quintero [Wed, 13 Feb 2013 17:14:17 +0000 (11:14 -0600)]
filechooserbutton: Remove unused function prototypes

11 years agofilechooserbutton: Restore to an empty previous selection properly
Federico Mena Quintero [Wed, 13 Feb 2013 17:01:50 +0000 (11:01 -0600)]
filechooserbutton: Restore to an empty previous selection properly

If no file was originally selected in the GtkFileChooserButton, then its
internal dialog is brought up and cancelled, then we need to restore the
selection back to none.  GtkFileChooser, though, doesn't like to
select a NULL file, so call _unselect_all() in that condition.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: Add test for setting/getting the current folder; currently fails
Federico Mena Quintero [Tue, 12 Feb 2013 05:12:20 +0000 (23:12 -0600)]
filechooserbutton: Add test for setting/getting the current folder; currently fails

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: Fix preserving the selection after cancelling the dialog
Federico Mena Quintero [Tue, 12 Feb 2013 05:03:26 +0000 (23:03 -0600)]
filechooserbutton: Fix preserving the selection after cancelling the dialog

The button's underlying file chooser dialog should not be used to store the file selection
while the dialog is unmapped.  Instead, the file chooser button now stores the
selection itself.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Remove some unused code
Federico Mena Quintero [Tue, 12 Feb 2013 02:12:32 +0000 (20:12 -0600)]
filechooser: Remove some unused code

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: Simplify the code to preserve the selection while the dialog is...
Federico Mena Quintero [Tue, 12 Feb 2013 01:33:17 +0000 (19:33 -0600)]
filechooserbutton: Simplify the code to preserve the selection while the dialog is running

It used to fetch a possibly multiple selection from the GtkFileChooserDialog, and then
pick just the first item from the selection list.  But since GtkFileChooserButton
operates in single-selection mode only, it can simply use gtk_file_chooser_get_file()
instead.

Also, the right way to reset the selection for GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
is with gtk_file_chooser_select_file(), not with _set_current_folder_file().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooserbutton: Don't set a starting folder in the underlying dialog
Federico Mena Quintero [Tue, 12 Feb 2013 01:11:33 +0000 (19:11 -0600)]
filechooserbutton: Don't set a starting folder in the underlying dialog

Let the dialog decide by itself.

11 years agofilechooser: Test canceling the dialog inside a GtkFileChooserButton
Federico Mena Quintero [Tue, 12 Feb 2013 00:19:45 +0000 (18:19 -0600)]
filechooser: Test canceling the dialog inside a GtkFileChooserButton

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Add a couple of tests for GtkFileChooserButton; they fail now
Federico Mena Quintero [Mon, 11 Feb 2013 23:50:33 +0000 (17:50 -0600)]
filechooser: Add a couple of tests for GtkFileChooserButton; they fail now

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Do tests with g_assert_cmpstr(), not g_assert(passed)
Federico Mena Quintero [Mon, 11 Feb 2013 21:20:46 +0000 (15:20 -0600)]
filechooser: Do tests with g_assert_cmpstr(), not g_assert(passed)

This lets us see exactly what failed, instead of just seeing a boolean error value.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Move some of the tests to GTestDataFunc
Federico Mena Quintero [Mon, 11 Feb 2013 21:11:26 +0000 (15:11 -0600)]
filechooser: Move some of the tests to GTestDataFunc

This code came from a home-grown testing mechanism, which didn't aggregate tests
into a test suite; it just ran them one by one.  Here we move some of that machinery
to GTestDataFunc for more flexibility in running tests.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
11 years agofilechooser: Get the filechooser tests to build
Federico Mena Quintero [Mon, 11 Feb 2013 19:38:58 +0000 (13:38 -0600)]
filechooser: Get the filechooser tests to build

Some are ifdef-ed out with BROKEN_TESTS, but at least the tests will compile for now.

11 years agoAdded scroll and touch events to GtkToolPalette
Juan Pablo Ugarte [Mon, 11 Feb 2013 20:52:35 +0000 (17:52 -0300)]
Added scroll and touch events to GtkToolPalette

11 years agofilechooser: follow the gtk-recent-files-enabled GtkSetting
Cosimo Cecchi [Wed, 13 Feb 2013 16:39:53 +0000 (11:39 -0500)]
filechooser: follow the gtk-recent-files-enabled GtkSetting

Avoid showing the Recent files entry if the setting is FALSE.

https://bugzilla.gnome.org/show_bug.cgi?id=693709

11 years agorecentmanager: follow gtk-recent-files-enabled GtkSetting
Cosimo Cecchi [Wed, 13 Feb 2013 16:05:47 +0000 (11:05 -0500)]
recentmanager: follow gtk-recent-files-enabled GtkSetting

https://bugzilla.gnome.org/show_bug.cgi?id=693724

11 years agosettings: add a gtk-recent-files-enabled GtkSetting
Cosimo Cecchi [Wed, 13 Feb 2013 16:05:07 +0000 (11:05 -0500)]
settings: add a gtk-recent-files-enabled GtkSetting

Backed by an XSetting, so g-s-d can set it according to the GSettings
value.

https://bugzilla.gnome.org/show_bug.cgi?id=693724

11 years agowayland: Handle wl_output in GdkWaylandScreen
Jan Arne Petersen [Sat, 2 Feb 2013 13:42:29 +0000 (14:42 +0100)]
wayland: Handle wl_output in GdkWaylandScreen

Expose information about outputs in GdkScreen (gdk_screen_get_n_monitors
and gdk_screen_get_monitor_*).

11 years agoAdd opacity_group hack
Alexander Larsson [Mon, 11 Feb 2013 19:33:52 +0000 (20:33 +0100)]
Add opacity_group hack

This adds a way to get the gtk_widget_set_opacity liike behaviour
of retargeting GdkWindows and exposing every child in ::draw, without
actually having an alpha. This is needed if you're doing more complex things
such as cross fading of widgets.

We do this as a hack by using opacity values that round to 255 yet not
really 1.0 in order to avoid having some magical API call for this
mainly internal call.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agowayland: skip pointer and keyboard events without a surface
Thomas Wood [Thu, 7 Feb 2013 15:38:40 +0000 (15:38 +0000)]
wayland: skip pointer and keyboard events without a surface

Pointer and keyboard events can be received after the surface has been
destroyed, in which case the surface will be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=693338

11 years agogdkwindow: don't use last_slave for the source device if it is NULL
Thomas Wood [Thu, 7 Feb 2013 11:59:31 +0000 (11:59 +0000)]
gdkwindow: don't use last_slave for the source device if it is NULL

Some backends do not have slave devices, which means last_slave may be
NULL. Use the current device as the source device if last_slave is NULL
when synthesizing a crossing event.

https://bugzilla.gnome.org/show_bug.cgi?id=692411

11 years agowayland: set the "transient inactive" flag on tooltip surfaces
Thomas Wood [Thu, 7 Feb 2013 11:27:25 +0000 (11:27 +0000)]
wayland: set the "transient inactive" flag on tooltip surfaces

This prevents the tooltip surfaces from taking the focus away from the
parent surface.

https://bugzilla.gnome.org/show_bug.cgi?id=693313

11 years agotooltip: set the transient parent when using the Wayland backend
Thomas Wood [Thu, 7 Feb 2013 11:27:00 +0000 (11:27 +0000)]
tooltip: set the transient parent when using the Wayland backend

Set the transient parent window on tooltips so that they can be
positioned correctly when using the Wayland backend.

https://bugzilla.gnome.org/show_bug.cgi?id=693313

11 years agoUpdate Arabic translations
Khaled Hosny [Tue, 12 Feb 2013 15:27:38 +0000 (17:27 +0200)]
Update Arabic translations

11 years agogtkcellrenderertext: Sink floating entry before using as signal argument
Simon Feltman [Fri, 8 Feb 2013 07:03:52 +0000 (23:03 -0800)]
gtkcellrenderertext: Sink floating entry before using as signal argument

Sink the GtkEntry assigned to the private structure of GtkCellRendererText
before signals containing it as an argument are sent out. This keeps
language bindings from sinking the reference and then destroying the entry
when the signal closure is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=693400

11 years agoRemove remnants of localization from gtk-demo
Matthias Clasen [Mon, 11 Feb 2013 21:48:29 +0000 (16:48 -0500)]
Remove remnants of localization from gtk-demo

gtk-demo isn't localized at this point.
https://bugzilla.gnome.org/show_bug.cgi?id=681578

11 years agoClean up the opacity handling
Alexander Larsson [Mon, 11 Feb 2013 13:20:40 +0000 (14:20 +0100)]
Clean up the opacity handling

This cleans up the internals but doesn't really change the behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agoFix compiler warnings
Adel Gadllah [Mon, 11 Feb 2013 10:38:04 +0000 (11:38 +0100)]
Fix compiler warnings

Remove two unused variables.

11 years agoMention the de-facto standard filename extension
Matthias Clasen [Mon, 11 Feb 2013 05:57:39 +0000 (00:57 -0500)]
Mention the de-facto standard filename extension

GtkBuilder files are commonly named .ui - mention that in the
docs.
https://bugzilla.gnome.org/show_bug.cgi?id=590325

11 years agoPlug a few memory leaks
Matthias Clasen [Mon, 11 Feb 2013 05:42:28 +0000 (00:42 -0500)]
Plug a few memory leaks

The accessibles for icon view items were not properly freed
in all cases.
https://bugzilla.gnome.org/show_bug.cgi?id=683311

11 years agoCorrect the documentation for how to set accessible names
Matthias Clasen [Sun, 10 Feb 2013 20:40:27 +0000 (15:40 -0500)]
Correct the documentation for how to set accessible names

The example in the GtkWidget docs was referring to a nonexisting
AtkObject::name property. The correct property name is
accessible-name.

11 years agoAdd a test for setting accessible name from gtkbuilder
Matthias Clasen [Sun, 10 Feb 2013 20:22:24 +0000 (15:22 -0500)]
Add a test for setting accessible name from gtkbuilder

This is wrongly documented in the GtkWidget docs.

11 years agoUpdated Lithuanian translation
Aurimas Černius [Sat, 9 Feb 2013 20:06:50 +0000 (22:06 +0200)]
Updated Lithuanian translation

11 years agoRevert "Updated Malayalam Localization"
Anish A [Fri, 8 Feb 2013 17:37:35 +0000 (21:37 +0400)]
Revert "Updated Malayalam Localization"

This reverts commit 434f07944bbd5997a71ced13d8b5e402ecaf4c8f.

11 years agoUpdated Malayalam Localization
Anish A [Fri, 8 Feb 2013 17:34:21 +0000 (21:34 +0400)]
Updated Malayalam Localization

11 years agoRevert "Visual C++: Update gtka11y projects completion"
Rico Tzschichholz [Fri, 8 Feb 2013 17:29:22 +0000 (18:29 +0100)]
Revert "Visual C++: Update gtka11y projects completion"

This broke 'make dist' on linux.

This reverts commit ecf2a9471b4dd440709ffa4ae7c3efb5741dfaa5.

11 years agoRevert "Drop things that break distcheck"
Rico Tzschichholz [Fri, 8 Feb 2013 17:29:13 +0000 (18:29 +0100)]
Revert "Drop things that break distcheck"

This reverts commit 2204f120839fbcebfab665fea0b70ed4176d7466.

11 years agocss: Add opacity reftest
Alexander Larsson [Thu, 7 Feb 2013 10:10:37 +0000 (11:10 +0100)]
css: Add opacity reftest

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agocss: Support opacity
Alexander Larsson [Wed, 6 Feb 2013 13:29:22 +0000 (14:29 +0100)]
css: Support opacity

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agoAdd singleton for css number 1.0
Alexander Larsson [Wed, 6 Feb 2013 13:28:20 +0000 (14:28 +0100)]
Add singleton for css number 1.0

This will be nice as this is will be the default for opacity.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agoTextHandle: Don't draw handles if not visible
Alexander Larsson [Tue, 5 Feb 2013 11:27:39 +0000 (12:27 +0100)]
TextHandle: Don't draw handles if not visible

When calling gtk_widget_draw() on the entry gtk_cairo_should_draw_window()
will return TRUE for all windows. This is used when rendering a widget to
somewhere other than the screen, and its now used for transparent widgets.
This caused the texthandle to always draw itself and terminate the draw
handler for the entry.

Instead we now only draw the markers when really visible, plus we return
FALSE to avoid stopping the entry drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agoAdd widget transparency test to testgtk
Alexander Larsson [Mon, 4 Feb 2013 10:14:41 +0000 (11:14 +0100)]
Add widget transparency test to testgtk

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agoAdd gtk_widget_get/set_opacity
Alexander Larsson [Wed, 7 Nov 2012 13:32:35 +0000 (14:32 +0100)]
Add gtk_widget_get/set_opacity

This adds gtk_widget_get/set_opacity, as well as a GtkWidget.opacity
property. Additionally it deprectates gtk_window_get/set_opacity and
removes the GtkWindow.opacity property (in preference for the new
identical inherited property from GtkWidget, which should be ABI/API
compat).

The implementation is using the new gdk_window_set_opacity child
window support for windowed widgets, and cairo_push/pop_group()
bracketing in gtk_widget_draw() for non-window widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agoAdd gtk_widget_(un)register_window
Alexander Larsson [Tue, 5 Feb 2013 08:36:49 +0000 (09:36 +0100)]
Add gtk_widget_(un)register_window

This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.

We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agogdkwindow: Allow gdk_window_set_opacity on non-native children
Alexander Larsson [Wed, 7 Nov 2012 12:03:32 +0000 (13:03 +0100)]
gdkwindow: Allow gdk_window_set_opacity on non-native children

We now store the current opacity for all windows. For native windows
we just call into the native implementation whenever the opacity changes.
However, for non-native windows we implement opacity by pushing a
second implicit paint that "stacks" on the existing one, acting as
an opacity group while rendering the window and its children.

This works well in general, although any native child windows will of
course not be opaque. However, there is no way to implement
implicit paint flushing (i.e. draw the currently drawn double buffer
to the window in order to allow direct drawing to the window).
We can't flush in the stacked implicit paint case because there
is no way to get the right drawing behaviour when drawing directly
to the window. We *must* draw to the opacity group to get the right
behaviour.

We currently flush if:
* A widget disables double buffering
* You call move/resize/scroll a window and it has non-native children
  during the expose handler

In case this happens we warn and flush the outermost group, so there may
be drawing errors.

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agogdkwindow: Store the implicit paint in a list
Alexander Larsson [Wed, 7 Nov 2012 12:01:09 +0000 (13:01 +0100)]
gdkwindow: Store the implicit paint in a list

This changes nothing, but lets us later have multiple
implicit paints

https://bugzilla.gnome.org/show_bug.cgi?id=687842

11 years agowayland: React to G_IO_ERR and G_IO_HUP on the wayland socket
Rob Bradford [Wed, 6 Feb 2013 18:08:15 +0000 (18:08 +0000)]
wayland: React to G_IO_ERR and G_IO_HUP on the wayland socket

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692728
11 years agowayland: remove debug message
Thomas Wood [Wed, 6 Feb 2013 10:41:06 +0000 (10:41 +0000)]
wayland: remove debug message

https://bugzilla.gnome.org/show_bug.cgi?id=693253

11 years agowayland: avoid returning NULL when getting a cursor
Thomas Wood [Tue, 5 Feb 2013 19:11:02 +0000 (19:11 +0000)]
wayland: avoid returning NULL when getting a cursor

https://bugzilla.gnome.org/show_bug.cgi?id=693257

11 years agowayland: use the GdkCursorType enum information to lookup the cursor name
Thomas Wood [Tue, 5 Feb 2013 19:10:25 +0000 (19:10 +0000)]
wayland: use the GdkCursorType enum information to lookup the cursor name

Use the enum information to generate the cursor name rather than using a
lookup table.

https://bugzilla.gnome.org/show_bug.cgi?id=693256

11 years agowayland: fix the direction of scrolling
Thomas Wood [Tue, 5 Feb 2013 17:00:10 +0000 (17:00 +0000)]
wayland: fix the direction of scrolling

Fix the direction of scrolling and convert the delta values into the
expected range.

https://bugzilla.gnome.org/show_bug.cgi?id=693251

11 years agoFix a small typo s/parater/parameter
Marc-André Lureau [Wed, 6 Feb 2013 16:25:50 +0000 (17:25 +0100)]
Fix a small typo s/parater/parameter

11 years agogdkwindow: Do not rely on a previous slave device when updating grab
Rob Bradford [Wed, 23 Jan 2013 16:55:59 +0000 (16:55 +0000)]
gdkwindow: Do not rely on a previous slave device when updating grab

_gdk_display_device_grab_update does not support passing in NULL for the
source device. If we don't have a slave device (saved in the pointer info)
then do not try and use that NULL pointer for the source_device.

This bug appeared in the Wayland backend where we (currently) only have master
devices exposed and as such no slave device is ever saved.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692411
11 years agobuild: Bump atk dependency to 2.7.5
Rob Bradford [Tue, 5 Feb 2013 18:36:48 +0000 (18:36 +0000)]
build: Bump atk dependency to 2.7.5

The following patch added a dependency on a new API first available in that
release:

commit 92f0c5c38476687a9a50c31eac4f674a7e0b9c91
Author: Mike Gorse <mgorse@suse.com>
Date:   Mon Dec 3 16:07:23 2012 -0600

    Add accessibility for GtkLevelBar and value test

11 years agowayland: Use g_value_set_static to avoid string copies
Rob Bradford [Tue, 5 Feb 2013 18:28:43 +0000 (18:28 +0000)]
wayland: Use g_value_set_static to avoid string copies

11 years agowayland: Pull the cursor theme name out from the setting for it
Rob Bradford [Tue, 5 Feb 2013 13:08:14 +0000 (13:08 +0000)]
wayland: Pull the cursor theme name out from the setting for it

This avoids us using the default theme and allows us to use a wider range of
cursors.

11 years agowayland: Advertise the cursor theme through GtkSettings as Adwaita
Rob Bradford [Tue, 5 Feb 2013 13:07:28 +0000 (13:07 +0000)]
wayland: Advertise the cursor theme through GtkSettings as Adwaita

... as per the way we advertise a GTK theme to use.

11 years agoUpdated POTFILES.in
Piotr Drąg [Mon, 4 Feb 2013 21:12:57 +0000 (22:12 +0100)]
Updated POTFILES.in

11 years agopost-release bump
Matthias Clasen [Mon, 4 Feb 2013 19:52:14 +0000 (14:52 -0500)]
post-release bump