Commit Graph

21254 Commits

Author SHA1 Message Date
Michael Natterer
1eb0d98d73 gtk: convert keyvals to unicode before committing to the imcontext 2012-11-30 15:06:48 +01:00
Michael Natterer
c0102b3089 gtk: add more OSX special casing for the deadacute and deaddoubleacute keys
So " plus foo prduces foo-with-diaereses and ' plus c produces
c-with-cedilla.
2012-11-30 14:43:32 +01:00
Alan McGovern
5637ef1f97 Fix broken function pointer declarations on windows
Both flashing a window and setting the window opacity were using
incorrect declarations for function pointers. They were missing the
WINAPI annotation as defined in windows.h. As a result, the stack
could be corrupted when these functions were invoked.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=689235
2012-11-29 15:06:02 +01:00
Michael Natterer
9644e910a8 quartz: add mountain lion as version 8 to enum GdkOSXVersion
Also use GDK_OSX_UNSUPPORTED instead of 0 in gdk_quartz_osx_version().
2012-11-29 14:51:59 +01:00
Michael Natterer
d6533ffc44 quartz: call Gestalt() only once per session in gdk_quartz_osx_version()
Thanks to Paul Davis for pointing this out.
2012-11-29 14:44:04 +01:00
Colin Walters
b06d83f393 git.mk: Update
The old version had race conditions with srcdir != builddir that I hit
sometimes in gnome-ostree.
2012-11-28 16:37:52 -05:00
Chun-wei Fan
2d57ddd6ef gtkimcontexttime.c: Check context_ime->client_window is not NULL
Be a bit more careful in get_pango_attr_list() and
get_utf8_preedit_string() to ensure that the client_window is properly
created before proceeding, to avoid access violation/segfault crashes on
Windows with IME installed, especially when running the pickers demo.

https://bugzilla.gnome.org/show_bug.cgi?id=682919
(cherry picked from commit a866ed7378)
2012-11-26 16:31:44 +01:00
Daniel Sabo
ffd949132a Bug 663990 - Tablet pressure is broken on MacOSX
Add extended input support to GDK Quartz.
2012-11-25 19:41:07 +01:00
Michael Natterer
f357151cc6 Bug 668239 - texts disappear when notebook switch page at zh_CN locate
In gtkimcontextime.c, use gdk_win32_window_get_impl_hwnd() to get to
the impl's existing native window instead of GDK_WINDOW_HWND() which
implicitly ensures a native window for the widget itself. This seems
to work around whatever GDK problem with native subwindows and fixes
the bug.
2012-11-23 15:42:13 +01:00
Camillo Lugaresi
0596f5591f Bug 688710 - splashscreen shouldn't be always on top on OS X
Activate the "hides on deactivate" behavior for splashscreens,
torn-off menus, utility windows, tooltips and notifications: when
another application is brought to the front, these windows are hidden
so as not to obscure it. This is the expected behavior for
application-specific floating windows on OS X.
2012-11-20 22:01:13 +01:00
Michael Natterer
27f3fcf12c quartz: fix the mapping of GDK_KP_Enter in known_numeric_keys[]
so it will actually be used, instead of delivering GDK_Return
when it should be GDK_KP_Enter.
2012-11-20 19:12:17 +01:00
Kazuki Iwamoto
2a24ee0756 Avoid a crash in gtk_im_context_ime_reset
When GTK+ runs with inputim-ime.dll module, there is NULL
pointer reference. Because "context_ime->client_window" may
be NULL in gtk_im_context_ime_reset.

https://bugzilla.gnome.org/show_bug.cgi?id=644906
(cherry picked from commit 74f57ee04d)
2012-11-20 12:32:37 +01:00
Michael Natterer
35a9322e45 quartz: always send GDK_NOTIFY_NONLINEAR crossing events
so GtkMenu works properly. This is not right, but not more
wrong than always sending GDK_NOTIFY_ANCESTOR either.
2012-11-20 10:02:02 +01:00
Michael Natterer
979e5061a0 Bug 672193 - windows (including menus) shown multiple times don't...
Based on a patch from Paul Davis, inject synthetic enter events directly
into the Quartz event stream, instead of trying to synthesize them in GDK.

This seems to magically fix most combo box popup weirdness, I guess
some code is relying on a specfic order of events, or any other state
imposed by the "proper" code path of events coming in the usual way.

The patch also removes _gdk_quartz_events_send_enter_notify_event()
which is now obsolete.
2012-11-20 10:01:08 +01:00
Matthias Clasen
53f3e5ee94 Avoid infinite recursion in the ime input module 2012-11-19 09:31:59 -05:00
Michael Natterer
b4a30877a9 quartz: use the real current event time for generated motion events 2012-11-18 20:15:45 +01:00
Michael Natterer
1a2509a6ab quartz: move tooltips window to the topmost level
so they can appear on top of popup menus. Also, reorder the switch()
statement in window_type_hint_to_level() so it resembles the stacking
order, to avoid confision like this in the future.
2012-11-18 17:45:12 +01:00
Kristian Rietveld
e982461ad6 quartz: correct deficiencies in the gdk_draw_drawable() implementation
The call to scrollRect: must be accompanied by a call to redraw the
newly exposed area, otherwise the scrollRect: will have no effect.
Secondly, compute the newly exposed area correctly.
Thirdly, also expose the lower window border or the area moved from
the lower window border if applicable, to make sure rounded corners
are properly drawn or don't leave garbage.
2012-11-15 14:59:11 +01:00
Kristian Rietveld
4d01c56d89 quartz: add _gdk_quartz_window_set_needs_display_in_region
It's needed for the next commit, which is an actual fix.
2012-11-15 14:49:25 +01:00
Michael Natterer
43e1354b71 quartz: filter out button press events on the window frame
Don't try to handle button press events on the window frame, they
have out-of-window coordinates. Also, break grabs on such events
so popup menus go away.
Patch from Kristian Rietveld, fixes bug 684419.
2012-11-15 11:34:15 +01:00
Michael Natterer
47f0e3f1e1 quartz: move SPLASHSCREEN-hinted windows to NSStatusWindowLevel
which does not really have a different effect than the previously
used NSPopUpMenuWindowLevel, but is what all code examples I found
are using, and it does make more sense.
2012-11-13 20:01:05 +01:00
Timothy Arceri
0239ee50be Remove bookmark duplicate of shortcut
Application code can set shortcut folders that are already bookmarks.
This code causes the bookmarks to be refreshed after the shortcut is
added removing any possible bookmark duplicates

https://bugzilla.gnome.org/show_bug.cgi?id=577806
2012-11-13 12:56:28 -06:00
Michael Natterer
5934ad2e22 quartz: _gdk_quartz_gc_update_cg_context(): the minimum line width is 1.0
not G_MINFLOAT. Patch from Kristian Rietveld.
2012-11-08 15:00:38 +01:00
Michael Natterer
376fc4d712 gtk: clean up properly in GtkFileChooserEntry's dispose() to fix crashes
Don't just unref the completion_store, call discard_completion_store()
instead which also unsets it as the GtkEntryCompletion's model.  Fixes
bug 681845 and probably some others, because the situation in this bug
is completely common.
2012-11-05 20:15:17 +01:00
Michael Natterer
c5421263e4 gail: use connect_object() for connecting to GtkTextBuffer signals
because the user_data is the GtkTextView. This used to crash when the
text view got destroyed, and the buffer was used for another view.
Fixes bug #652204.
2012-11-05 03:19:50 +01:00
Cosimo Cecchi
de89546e30 Use bookmarks file from gtk-3.0 XDG config dir if present
Will read from old location if new location isn't found, and will always
write back to the original location the file was read from.

Adapted from commit ceb3fecd11 on the
master branch, based on a patch from
William Jon McCann <jmccann@redhat.com>
2012-10-29 09:52:26 -04:00
Alexander Larsson
bb867e9406 win32: Don't leak the pixmap cairo_surface
GdkPixmapWin32 allocates a cairo_surface manually for non-foreign
pixmaps, instead of letting GdkDrawableWin32 create on on-demand.
However, the pixmap created surface is a strong ref, rather than the
weak ref created by gdk_win32_ref_cairo_surface() so we can't rely
on _gdk_win32_drawable_finish to actually free it. So, we have to
manually free it when we finalize or we leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=685959
2012-10-24 12:43:27 +02:00
Hendrik Knackstedt
85bb1a161c Updated German translation 2012-10-19 13:38:27 +02:00
Kristian Rietveld
0e42cf81f1 quartz: Actually use the window background PATTERN color
Before we used a window's background color, which resulted in corrupted
display in some cases, presumably because we didn't reset the active
pattern. This patch seems to eliminate the observed corruption.
2012-10-09 16:16:42 +02:00
Chun-wei Fan
b9575dddfd gtk+.props: (VS2010) Update include paths
Correct the include paths for GDK-Pixbuf, as that update was somehow
forgotten :|

Thanks to Berke Viktor for pointing this out.
2012-10-07 22:53:39 +08:00
Kristian Rietveld
92ea94af5f Fix garbage content when windows are initially mapped
The garbage would be visible if any widget enabled the toplevel
NSView's CALayer in order to do custom native rendering.
2012-09-28 10:07:59 +02:00
Matthias Clasen
9b61330380 Really move the docs to a new location
It turns out that library.gnome.org is looking for DOC_MODULE
when deciding how to name the directory. So, we have to change
that to gtk2/.
2012-09-27 20:12:21 -04:00
Chun-wei Fan
6389671336 Update Visual C++ property sheets
"Install" the gtk-demo program and data files more like the way done by the
autotools build.
2012-09-26 18:57:13 +08:00
Matthias Clasen
81bb13510b 2.24.13 2012-09-23 16:42:08 -04:00
Matthias Clasen
b8a49d1e87 Updates 2012-09-23 16:41:44 -04:00
Matthias Clasen
7336783e57 Change the location of the online docs
It is better to install these under gdk2/ and gtk2/, to make
it explicit what version they are about. Doing this will eventually
let us move the gtk3 docs to gtk/.
2012-09-23 15:04:06 -04:00
Chun-wei Fan
8f5ab02369 Visual C++ support: Add projeccts to build gailutil
This adds Visual C++ 2008/2010 projects to build the gailutil DLL, like
the 3.x releases.
2012-09-18 17:56:17 +08:00
Michael Natterer
79b3326eaa quartz: Bug 674108 - Hard crash due to wrong NSAutoreleasePool stacking
Apply patch from Kristian Rietveld which addresses two issues
in gdkeventloop-quartz.c:

This patch moves the autorelease pool drain and introduces protection against
the invalidated ufds. Basically, when we suspect ufds has been invalidated by a
recursive main loop instance, we refrain from calling the collect function.
2012-09-14 15:18:33 +02:00
Matthias Clasen
c8aa94f7a8 immulticontext: Always check if the global context id changed
This makes sure that if the gtk-im-module setting changes we update
our internal state immediately on the next event whichever it is.
In particular this fixes the case of the gtk-im-module setting
changing while the user is typing and the slave context remaining
the same, effectively ignoring the setting change.

Backport of a0f155e839.

https://bugzilla.gnome.org/show_bug.cgi?id=675365
2012-09-09 20:06:38 -04:00
Matthias Clasen
1533e67ae4 Try harder to discriminate Shift-F10 and F10
A change in xkeyboard-config 2.4.1 made it so that function keys
now have a shift level which has the same symbol, but 'eats' the
shift modifier. This would ordinarily make it impossible for us
to discriminate between these key combinations.

This commit tries harder to discriminate in 2 ways:
- XKB has a mechanism to tell us when a modifier should not be
  consumed even though it was used in determining the level.
  We now respect such 'preserved' modifiers. This does not fix
  the Shift-F10 vs F10 problem yet, since xkeyboard-config does
  not currently mark Shift as preserved for function keys.
- Don't consume modifiers that do not change the symbol. For
  the function keys, the symbol on the shift level is the same
  as the base level, so we don't consider Shift consumed.

For more background on the xkeyboard-config change, see
https://bugs.freedesktop.org/show_bug.cgi?id=45008

https://bugzilla.gnome.org/show_bug.cgi?id=661973
2012-09-09 18:49:18 -04:00
Kristian Rietveld
b4ddf24234 Implement gtk-primary-button-warps-slider GtkSetting
It replaces the recently added GtkRange:primary-button-warps-slider
style property. Implement the setting in the quartz backend,
it proxies the "click in the scroll bar to" property from the
OS X PrefPane.
2012-09-07 16:46:08 +02:00
Cosimo Cecchi
15999ec5f3 range: make condition consistent with GTK3
cc7abf6a1c introduced the
primary-button-warps-slider style property, but with a different
condition check than the GTK3 counterpart.
It turns out we really need to check for the mouse click location here,
or we'll warp the slider to pointer also in case we clicked on the
slider itself.

https://bugzilla.gnome.org/show_bug.cgi?id=683512
2012-09-06 12:03:17 -04:00
Piotr Drąg
1c401ea913 Updated Polish translation 2012-09-04 02:28:08 +02:00
Matthias Clasen
8b18b439af 2.24.12 2012-09-03 14:33:47 -04:00
Emmanuele Bassi
1070c5849e recent-manager: Coalesce multiple changes
Since the ::changed implementation of GtkRecentManager implies a
synchronous write operation, when we receive multiple requests to emit a
::changed signal we might end up blocking.

This change coalesces multiple ::changed emission requests using the
following sequence:

  • the first request will install a timeout in 250 ms, which will
    emit the ::changed signal

  • each further request while the timeout has not been emitted
    will increase a counter

      ‣ if the counter reaches 250 before the timeout has been
        emitted, then the RecentManager will remove the timeout
        source and force a signal emission and reset the counter

This sequence should guarantee that frequent ::changed emission requests
are coalesced, and also guarantee that we don't let them dangle for too
long.

https://bugzilla.gnome.org/show_bug.cgi?id=616997
2012-09-03 13:23:56 -04:00
Cosimo Cecchi
cc7abf6a1c range: add a primary-button-warps-slider style property
Setting this to TRUE (it's FALSE by default) enables the behavior we
have in GTK3 for scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=683279
2012-09-03 11:56:58 -04:00
Piotr Drąg
88bfb0f59e Updated Polish translation 2012-08-31 20:45:02 +02:00
Cosimo Cecchi
af26ec6a73 tooltip: add tooltip-radius and tooltip-alpha style properties
This allows themes to change the tooltip opacity and radius. Based on a
downstream Fedora patch by Matthias Clasen.

https://bugzilla.gnome.org/show_bug.cgi?id=683070
2012-08-30 21:41:40 -04:00
Kristian Rietveld
3d5cd6e055 quartz: fix corruption during scrolling in some cases
A call to scrollRect must be followed by a call to set that the offset
rect needs display for the changes to "take effect". This was not
done prior to this patch which, in some cases, caused corruption during
scrolling.
2012-08-26 15:45:46 +02:00
Michael Natterer
c0c3085128 quartz: add evil casting to make sure time wraps correctly on 32bit machines
get_time_from_ns_event(): apply patch from Michael Hutchinson which
makes sure the returned guint32 wraps correctly on 32 bit machines
when the uptime exceeds 2^32 ms.
(cherry picked from commit 78506bd604)
2012-08-23 09:32:20 +02:00