Commit Graph

4893 Commits

Author SHA1 Message Date
Aleksander Morgado
a61b359498 GdkBroadwayDisplay: include proper port number in error trace 2012-12-05 11:23:35 +01:00
Aleksander Morgado
4dabc8ba84 GdkBroadwayDisplay: initialize GError before using it 2012-12-05 11:23:28 +01:00
Matthias Clasen
256f168525 Obtain the recent files max age setting from xsettings
This will help with implementing desktop-wide policy for
retaining of history.

https://bugzilla.gnome.org/show_bug.cgi?id=689047
2012-11-29 23:10:33 -05:00
Alan McGovern
149de71624 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
(cherry picked from commit 5637ef1f97)
2012-11-29 15:07:42 +01:00
Michael Natterer
709f12b9ac quartz: add mountain lion as version 8 to enum GdkOSXVersion
Also use GDK_OSX_UNSUPPORTED instead of 0 in gdk_quartz_osx_version().
(cherry picked from commit 9644e910a8)
2012-11-29 15:00:57 +01:00
Michael Natterer
e2144fbb7e quartz: call Gestalt() only once per session in gdk_quartz_osx_version()
Thanks to Paul Davis for pointing this out.
(cherry picked from commit d6533ffc44)
2012-11-29 15:00:38 +01:00
Camillo Lugaresi
4f6e1fdf16 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.
(cherry picked from commit 0596f5591f)
2012-11-20 22:03:40 +01:00
Michael Natterer
d0af25f12c 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.
(cherry picked from commit 27f3fcf12c)
2012-11-20 19:14:43 +01:00
Michael Natterer
455a0ecc1c 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.
(cherry picked from commit 35a9322e45)
2012-11-20 10:35:40 +01:00
Michael Natterer
2d5ad5f54e 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.

(sortof cherry-pixked from 979e5061a0
but needed manual editing because GdkQuartzWindow.c was renamed
and apparently earlier patches not picked correctly/completely)
2012-11-20 10:28:58 +01:00
Michael Natterer
b55724e3a7 quartz: use the real current event time for generated motion events
(cherry picked from commit b4a30877a9)
2012-11-18 20:17:22 +01:00
Michael Natterer
f2e05e2b41 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. Fixes bug 688512.
(cherry picked from commit 1a2509a6ab)
2012-11-18 17:47:33 +01:00
Michael Natterer
18fdc975be quartz: GdkQuartzWindow -> GdkQuartzNSWindow was forgotten in one place 2012-11-15 13:17:31 +01:00
Michael Natterer
ed5d7fed89 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.
(cherry picked from commit 43e1354b71)
2012-11-15 12:35:58 +01:00
Michael Natterer
aa989a637a 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.
(cherry picked from commit 47f0e3f1e1)
2012-11-13 20:05:33 +01:00
Alexander Larsson
8a40d8fe2a gdk: Add gdk_window_has_alpha helper
This centralizes the current checks for has_alpha_bg, which
lets us extend the check later.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2012-11-09 10:08:22 +01:00
Matthias Clasen
9ebeb4e68a Bump GLib dependency to 2.35
And drop deprecated g_type_init() calls.
2012-11-04 13:01:38 -05:00
Ran Benita
21cf5a7e00 wayland: update to work with stable libxkbcommon
libxkbcommon has had some changes to its API. However, it now has a
stable release (0.2.0), so this makes the necessary changes, and
replaces all uses of the deprecated API.

Signed-off-by: Ran Benita <ran234@gmail.com>
2012-10-29 15:45:31 +00:00
John Ralls
41f29032d2 Fix typo from f2ab3af 2012-10-25 10:58:56 -07:00
Matthias Clasen
5aff66f391 Add GDK_VERSION_3_8
This macro is needed for the new AVAILABLE_IN and DEPRECATED_IN
macros.
2012-10-23 17:36:17 -04:00
Jean Parpaillon
247bc3ad69 Fix out of source tree building for gdk/broadway
This patch fix compilation when building out of source tree (gdk/broadway dir).

Signed-off-by: Colin Walters <walters@verbum.org>
2012-10-22 11:30:37 -04:00
Scott Moreau
e5b88f1bdd wayland: Update to reflect protocol changes 2012-10-19 12:21:35 +01:00
Stefano Facchini
0f36b16733 Add gdk version macros for 3.8
https://bugzilla.gnome.org/show_bug.cgi?id=684288
2012-10-17 14:12:57 +02:00
Kristian Rietveld
c7ce4b6b3d 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.
(cherry picked from commit 0e42cf81f1)
2012-10-09 16:19:29 +02:00
Cosimo Cecchi
e09cf6978e gdk: only emit display-opened after the default display has been set
This avoids a case where the display has been opened, but calling
gdk_display_get_default() in the callback doesn't work.

Reviewed-by: Benjamin Otte <otte@redhat.com>
2012-10-08 18:44:09 -04:00
Benjamin Otte
f9ddfa28b8 x11: Put function in header, don't declare them extern 2012-10-06 15:55:30 -04:00
Benjamin Otte
dd3c56d783 gdk: Ignore headers for declared functions 2012-10-06 15:55:30 -04:00
Alexander Larsson
83c66c9c2c Make process_all_updates draw synchronously
By calling XSync in _gdk_x11_display_after_process_all_updates we
effectively make gdk rendering sync, which avoids problems with the
client animations running faster than the Xserver rendering, thus
filling up the X rendering pipes and essentially "locking up" the
Xserver (i.e. you can't even close the offending window because the
WM is starved too).

I verified this worked by making GtkSpinner paint multiple times on my
intel driver (which has some issue making this rendering slow atm),
and without this patch i get severe lag where even window dragging
stops for 5 seconds when i drag the mouse around. However, with the
patch everything is smooth.

https://bugzilla.gnome.org/show_bug.cgi?id=684639
2012-10-02 13:12:49 +02:00
Alexander Larsson
db374a0a87 broadway: Use binary websockets if available 2012-10-01 14:58:57 +02:00
Alexander Larsson
86bcd1c22c broadway: Output message data directly to buffer
This cleans up the code, as well as allows later format
changes for e.g. binary websockets
2012-10-01 14:58:57 +02:00
Alexander Larsson
17aea12417 broadway: Encode urls directly into message buffer
No need for a temporary buffer
2012-10-01 14:58:56 +02:00
Alexander Larsson
95d9b17f35 broadway: Restructure output
Now we queue all output commands in a single buffer, to
ensure we send everything in a single op even for v7plus.
2012-10-01 14:58:56 +02:00
Alexander Larsson
203dd8bf7a broadway: Fix indentation 2012-10-01 14:58:56 +02:00
Alexander Larsson
96e7ff73dd broadway: Detect binary websockets support 2012-10-01 14:58:56 +02:00
Alexander Larsson
7c87684629 broadway: Centralize cmd parsing
This clean up things, as well as prepares for new message formats
such as binary websockets.
2012-10-01 14:58:56 +02:00
Benjamin Otte
8f96966178 window: Fail if the parent window and the visual don't match
They must be on the same screen.
2012-09-28 18:27:49 +02:00
Kristian Rietveld
4ccf8609ab quartz: 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.
(cherry picked from commit 92ea94af5f)
2012-09-28 10:11:16 +02:00
Matthias Clasen
5f9b010b94 Fix gdk docs build
This took far too long: The actual problem turned out to
be an unclosed <SECTION> in gdk3-sections.txt.
2012-09-18 13:54:22 -04:00
Matthias Clasen
e95490c15e GdkWindow: remove reference to a long-removed example 2012-09-18 13:54:22 -04:00
Michael Natterer
1ad25dfb81 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.
(cherry picked from commit 79b3326eaa)
2012-09-14 15:22:18 +02:00
Kristian Rietveld
64324a5da0 Implement gtk-primary-button-warps-slider GtkSetting
Make GtkRange honor the setting and implement it in the
quartz backend, it proxies the "click in the scroll bar to"
property from the OS X PrefPane.
2012-09-11 11:19:09 +02:00
Bastien Nocera
42f953eead gdk: s/availible/available/ 2012-09-10 17:39:27 +01:00
Daiki Ueno
7937b5d9f1 gdk: fix GI annotation and document for {map,add}_virtual_modifiers
https://bugzilla.gnome.org/show_bug.cgi?id=677559
2012-09-10 15:03:25 +02:00
Matthias Clasen
eb9223c008 Be more strict in ignoring ineffective modifiers
After my recent fix for this, nautilus was still having problems
telling keeping F10 and Shift-F10 apart. With this change, we are
treating levels with the same symbol like inactive levels, ignoring
them entirely.
2012-09-09 18:28:48 -04:00
John Ralls
f2ab3af20a Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion 2012-09-03 16:56:46 -07:00
Matthias Clasen
314b6abbe8 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-01 23:25:18 -04:00
Alexander Larsson
29a42085c6 Remove gdk_window_flush_if_exposing as its not needed anymore
We no longer support modifying GdkWindow hierarchies during
expose events. This is not working anymore anyway as the
flush operation now does not push already rendered pixels
in the flushed window from the double buffer to the window.

https://bugzilla.gnome.org/show_bug.cgi?id=679144
2012-08-23 16:31:31 +02:00
Alexander Larsson
e112cdacd4 Fix flashing in non-double-buffered widgets
Avoid copying back partially drawn double-buffer data
when flushing to avoid flicker. This means non double
buffered widgets must draw opaque pixels in its expose
handlers, and that you are not allowed to use direct
rendering (or modify GdkWindow pos/size/order) from
inside the expose handler of a double buffered widget.

See https://bugzilla.gnome.org/show_bug.cgi?id=679144 for more
details
2012-08-23 16:31:30 +02:00
Alexander Larsson
820b0cafe0 gdkwindow.c: Fix up window debug code
Make this build and fully print clip regions.
2012-08-23 12:16:43 +02:00
Alexander Larsson
04811d9483 Avoid unnecessary window flushes
The code was calling _gdk_window_ref_cairo_surface in a few places
where the intent was not to read/write to the surface, but just look
at its type (to e.g. create a similar surface). This is bad, as that
operation causes a flush which may cause unnecessary work and/or
flashing. Instead we just get the impl surface in these cases.
2012-08-23 12:16:43 +02:00