Commit Graph

33674 Commits

Author SHA1 Message Date
Cosimo Cecchi
018a425562 immodule: fix a GCC warning 2013-02-18 19:38:21 -05:00
Owen W. Taylor
b61198cfcb GdkWindow: don't leak the newly created frame clock 2013-02-18 15:25:52 -05:00
Owen W. Taylor
3e81854351 gtk_widget_on_frame_clock_update: ref the widget
Handle a widget being destroyed while in a tick callback by
referencing the widget while dispatching tick callbacks.
2013-02-18 15:25:51 -05:00
Мирослав Николић
e6b5608f43 Updated Serbian translation 2013-02-18 19:15:01 +01:00
Bastien Nocera
3c8a4126a8 GtkAccelLabel: Don't show "+" if there's no more keys to add
With the following code:
    #define INVALID_CHAR GDK_KEY_VoidSymbol - 1
    gtk_accelerator_get_label (INVALID_CHAR, GDK_SHIFT_MASK | GDK_CONTROL_MASK);
we would get this label:
    Shift+Ctrl+
instead of this label:
    Shift+Ctrl

https://bugzilla.gnome.org/show_bug.cgi?id=694075
2013-02-18 18:00:44 +01:00
Alexander Larsson
5dbf814f0c win32: Request higher precision timers during animations
The default windows timer resolution is 16msec, which is too little
for fluent animations (say at 60Hz). So, while a paint clock is
active we temporarily raise the timer resolution to 1 msec.
2013-02-18 17:14:25 +01:00
Owen W. Taylor
1db87c897f Add gdk_frame_clock_begin/end_updating()
Add an API to start or stop continually updating the frame clock.
This is a slight convenience for applcations and avoids the problem
of getting one more frame run after an animation stops, but the
primary motivation for this is because it looks like we might have
to use timeBeginPeriod()/timeEndPeriod() on Windows to get reasonably
accurate timing, and for that we'll need to know if there is an
animation running.

https://bugzilla.gnome.org/show_bug.cgi?id=693934
2013-02-18 17:14:24 +01:00
Shushi KUROSE
1da329b2bd [l10n] Update Japanese translation 2013-02-18 23:36:53 +09:00
Jiro Matsuzawa
3740ebf866 [l10n] Update Japanese translation
Merge the latest pot.
2013-02-18 23:32:29 +09:00
Alexander Larsson
ead64bfedd Remove unnecessary copy of GdkFrameClockIdlePrivate 2013-02-18 11:24:03 +01:00
Alexander Larsson
38ada3b61b win32: Fix build
gdkwindown-win32.c included windows.h directly rather than via gdkwin32.h
which broke the build for me at least. Instead rely on it being included in
gdkwin32.h and things work right.
2013-02-18 11:20:40 +01:00
Alexander Larsson
7319a0f237 GtkEntry: Fix text handle painting
We only draw the main entry on should_draw (widget->window), because
otherwise we also draw it on the GtkTextHandle widgets.

This is necessary due to the recent change for that to not return
TRUE and swallow the rest of the drawing operation.
2013-02-18 09:38:11 +01:00
Alexander Larsson
c6bbfc8e3d Add a few missing gtk_widget_unregister_window calls
This was causing warnings on widget unparent like:

Gdk-CRITICAL **: gdk_window_has_native: assertion `GDK_IS_WINDOW (window)' failed

Becasue the window was not properly removed from the lists on unrealize.
2013-02-18 09:35:58 +01:00
Marek Černocký
a9cf3995a6 Updated Czech translation 2013-02-17 20:06:53 +01:00
Piotr Drąg
7938e1f1cb Updated Polish translation 2013-02-17 19:48:15 +01:00
Owen W. Taylor
69d42639b2 GdkWindowX11: the root window is not a toplevel
The macros we had for checking for toplevel windows were passing
through the root window, which was not intentional and meant that
for the root window WINDOW_IS_TOPLEVEL() returned TRUE but
window->impl->toplevel was NULL, causing gdk_window_create_cairo_surface()
to crash.
2013-02-16 11:56:17 -05:00
Paolo Borelli
bae84bdf23 [entry] unregister icon windows 2013-02-16 16:28:45 +01:00
Owen W. Taylor
d203f63641 GdkFrameClockIdle: remove timeouts in dispose
When a frame clock is disposed, remove active timeouts; also get
rid of the last traces of an unused GTimer.
2013-02-15 22:28:52 -05:00
Owen W. Taylor
ecddf94f43 GtkScrolledWindow: use gtk_widget_add_tick_callback()
This is slightly simpler and more robust than direct use of
GdkFrameClock.
2013-02-15 22:28:46 -05:00
Changwoo Ryu
658e7c4535 immodule: Fix context ID lookup on module with multiple contexts
https://bugzilla.gnome.org/show_bug.cgi?id=690247
2013-02-16 10:04:47 +09:00
Jasper St. Pierre
0fe08d43b5 Update gtk.symbols 2013-02-15 19:50:13 -05:00
Jasper St. Pierre
61f6463b96 Update gdk.symbols 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
b777a16b06 gdkframeclockidle: Don't expose sleep_source source funcs 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
caa1721658 gtkplug: Remove a no-op func 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
367364a8e1 Fix deprecations for GtkIconInfo 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
489a10f488 gtkicontheme: Mark copy/free compat symbols as skip 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
bf7804db64 gdkframeclock: Fix doc comments 2013-02-15 19:33:10 -05:00
William Jon McCann
8e96488bb2 Don't crash if inhibit is called with an unrealized window 2013-02-15 16:56:06 -05:00
Aurimas Černius
8f276d4b65 Updated Lithuanian translation 2013-02-15 21:52:54 +02:00
Baurzhan Muftakhidinov
8bfea4bdaf Updated Kazakh translation. 2013-02-15 20:53:49 +06:00
Alexander Larsson
bbb981fd1a Fix gtk_widget_add_tick_callback sometimes not working
We clear GtkTickCallbackInfo on creation to ensure all fields start
as 0. Before we sometimes ended up with destroyed being 1
so the tick was never called.
2013-02-15 15:46:33 +01:00
Alexander Larsson
c6c33c5cd7 Fix up s/gtk_frame_clock/gdk_frame_clock/ in docs 2013-02-15 14:02:02 +01:00
Alexander Larsson
19784959e0 Fix GtkIconInfo docs
gtk_icon_info_copy and gtk_icon_info_free are deprecated for
the corresponding GObject methods.

We set correct transfer markup for the GtkIconInfo returning methods
to fix the introspection of them.

gtk_icon_info_load_symbolic_for_context_async had the wrong method
name in its documentation block.
2013-02-15 11:07:51 +01:00
Carles Ferrando
233b0385fa [l10n] Updated Catalan (Valencian) translation 2013-02-15 01:30:17 +01:00
Gil Forcada
3856fbb0dc [l10n] Updated Catalan translation 2013-02-15 01:30:07 +01:00
Cosimo Cecchi
e2f76f0c2e Fix a typo in the README 2013-02-14 18:23:47 -05:00
Owen W. Taylor
ce835dee74 GtkContainer: fix disconnection from frame clock
We need to disconnect the frame clock when we unrealize (at which
point the old clock is still alive) not in destroy(). Since there
is no common unrealize for containers, trigger this from GtkWidget.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
7bb07317f3 GtkTickCallback: document use of G_SOURCE_CONTINUE/REMOVE for return value
Document that G_SOURCE_CONTINUE and G_SOURCE_REMOVE are the preferred
return values from a tick callback.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
e2705544ab Don't compress motion events for different devices
A switch of device may be significant for an application, so don't
compress motion events if they are for different devices. This simple
handling isn't sufficient if we have competing event streams from
two different pointer events, but we don't expect this case to be
common.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
ff935c5738 Ignore window manager protocol messages for destroyed windows
If we get, for example, a _NET_WM_FRAME_DRAWN or _NET_WM_PING
message on a destroyed window, then we should just ignore it.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
6e986afbae Small documentation fixes for frame synchronization
Found by Benjamin Otte
2013-02-14 17:19:53 -05:00
Owen W. Taylor
4c9749ee9e gdk_frame_clock_get_frame_time(): use gint64 for time 2013-02-14 17:19:53 -05:00
Owen W. Taylor
63a36aa434 Merge with Merge GdkFrameHistory into GdkFrameClock 2013-02-14 17:19:53 -05:00
Owen W. Taylor
815ef1bcc0 GdkFrameClock: update documentation 2013-02-14 17:19:53 -05:00
Owen W. Taylor
c37de57f14 GdkFrameTimings: add documentation 2013-02-14 17:19:52 -05:00
Owen W. Taylor
bb11195ec0 GdkFrameClock: Clean up the public API
* remove gdk_frame_clock_get_frame_time_val(); a convenience
  function that would rarely be used.
* remove gdk_frame_clock_get_requested() and
  ::frame-requested signal; while we might want to eventually
   be able to track the requested phases for a clock, we don't
  have a current use case.
* Make gdk_frame_clock_freeze/thaw() private: they are only
  used within GTK+ and have complex semantics.
* Remove gdk_frame_clock_get_last_complete(). Another convenience
  function that I don't have a current use case for.
* Rename:
  gdk_frame_clock_get_start() => gdk_frame_clock_get_history_start()
  gdk_frame_clocK_get_current_frame_timings() => gdk_frame_clock_get_timings()
2013-02-14 17:19:52 -05:00
Owen W. Taylor
d5edf9c072 GdkFrameTimings: strip down to a minimal public API
Since we're not exporting the ability to create your own frame
clock for now, remove the setters for GdkFrameTimings fields.
Also remove all setters and getters for fields that are more
about implementation than about quantities that are meaningful
to the applcation and just access the fields directly within
GDK.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
515e5f74aa Merge GdkFrameHistory into GdkFrameClock
Now that GdkFrameClock is a  class, not interface, there's no real advantage
to splitting the frame history into an aggregate object, so directly
merge it into GdkFrameClock.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
5f2d1654a5 Change GdkFrameClock from an interface to a class
It's unlikely that anyone will want to have, say, a GtkWidget that
also acts as a GdkFrameClock, so an abstract base class is as
flexible as making GdkFrameClock an interface, but has advantages:

 - If we decide to never make implementing your own frame clock
   possible, we can remove the virtualization.
 - We can put functionality like history into the base class.
 - Avoids the oddity of a interface without a public interface
   VTable, which may cause problems for language bindings.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
be22b9fbb9 GdkWindow: make the frame clock an inherent property of the window
Instead of making the frame clock a settable property of a window, make
toplevel windows inherently have a frame clock when created (getting
rid of the default frame clock.) We need to create or destroy frame
clocks when reparenting a window to be a toplevel, or to not be a
toplevel, but otherwise the frame clock for a window is immutable.
2013-02-14 17:19:52 -05:00