Commit Graph

29237 Commits

Author SHA1 Message Date
Rui Matos
70f87b8bd5 gtk: Add a GTK_STATE_FLAG_WINDOW_UNFOCUSED widget state flag
This allows themes to style widgets differently according to whether the
toplevel window they are in is presented as focused.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-11-08 19:33:22 +00:00
Rui Matos
95648fd194 x11: Implement GDK_WINDOW_STATE_FOCUSED on top of _NET_WM_STATE_FOCUSED
_NET_WM_STATE_FOCUSED is a new _NET_WM_STATE hint which allows us to
implement a meaningful GDK_WINDOW_STATE_FOCUSED under X11. If the window
manager doesn't support this hint we keep GDK_WINDOW_STATE_FOCUSED set since
that is what gtk+ implicitly assumed historically.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-11-08 19:33:22 +00:00
Rui Matos
43f1b5abbc gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState
This state means that the toplevel window is presented as focused to the user,
i.e with active decorations under an X11 window manager.

If the GDK backend doesn't implement this flag, it will just remain set after
mapping the window.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-11-08 19:25:51 +00:00
Marc-André Lureau
c1e8e7ba22 reftests: Add a reftest for background-repeat css property
https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 12:41:35 -05:00
Cosimo Cecchi
f9d16f3923 themingengine: set the cairo extend to PAD when we're stretching bg
This avoids artifacts around the borders due to bilinear filtering cairo
applies to the surface pattern when stretching it.

https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 12:41:28 -05:00
Marc-André Lureau
3b436eec6d css: start background-repeat
By default, a background image is stretched. Instead, it is worth to
have a tiled background.

This patch allows background surfaces to be repeated or not, and should
be compatible with future extensions and CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 11:10:44 -05:00
Marc-André Lureau
ee7ac4fa44 Rename s/GtkCssRepeatStyle/GtkCssBorderRepeatStyle/g
https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 11:10:41 -05:00
John Ralls
085b98f470 [Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()"
If a zero-sized NSImage calls lockfocus it throws an exception. Make sure that the image isn't zero-sized before calling lockfocus, and log a warning and return NULL if it is zero-sized.

Have the quartz version of gtk_drag_begin_idle return FALSE if the returned image is NULL.
2011-11-07 14:25:08 -08:00
John Ralls
42656dde57 Revert "[Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()". Utterly screwed up. Sorry.
This reverts commit 8216324e4b.
and          commit 3243e6955c.
2011-11-07 13:57:10 -08:00
John Ralls
3243e6955c Fix accidental paste error in 8216324 2011-11-07 13:18:14 -08:00
John Ralls
8216324e4b [Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()
If _gtk_quartz_create_image_from_pixbuf is given a pixbuf with size 0, 0
or which produces an NSImage with size 0.0, 0.0, it throws an exception
which Gtk doesn't handle.

your changes. Lines starting
2011-11-07 13:11:18 -08:00
Michael Natterer
ac943bf69a gdk: exclude MOD1 from the virtual modifier mapping
which effectively nails down the MOD1 == ALT assumption that is valid
in all other parts of GTK+. After the modifier abstraction fixes for
OSX, the virtual mapping is now (correctly) used in more places, and
caused problems with the common default PC keyboard layout on X11 that
colocates ALT and META on the same key.
2011-11-07 20:09:00 +01:00
Morten Welinder
d80953666e Print preview: make cancel work
This makes cancels of a print preview work in the same way it
works for non-previews, i.e., the operation stops at the next
page boundary.

https://bugzilla.gnome.org/show_bug.cgi?id=662160
2011-11-07 13:10:24 -05:00
Michael Natterer
d1c6bcb85c quartz: handle recursive CFRunLoops
Fixes e.g. crashs when dropping from finder.

Turn the "getting_events" boolean into a counter to handle poll_func()
being called recursively, and track the loop depth correctly by
changing its counter before bailing out in run_loop_observer_callback().
This way we reallocate our autorelease pool at the right time, and
don't kill memory that is still in use by outer run loops.

Also drain, not release the pool, just for some defensive forward
compatibility.
(cherry picked from commit ef9a92d225)
2011-11-06 23:38:50 +01:00
Torsten Schönfeld
4ef61e2311 gtk: add annotations for some GtkRadio* constructors
Since constructors like gtk_radio_button_new_from_widget take an
instance of their type as the first argument, the gi scanner interprets
them as methods.

https://bugzilla.gnome.org/show_bug.cgi?id=661858
2011-11-06 16:50:57 +01:00
Kristian Rietveld
88329aeff4 quartz: use get_toplevel_from_ns_event in one more place
Fixup needed due to refactoring in GTK+-3.0.
2011-11-06 10:36:00 +01:00
Kristian Rietveld
b78658c310 quartz: make gdk_quartz_osx_version conform to coding style 2011-11-06 10:17:46 +01:00
Kristian Rietveld
e5ccae5782 quartz: make test_resize () conform to coding style 2011-11-06 10:16:27 +01:00
Kristian Rietveld
9f45c37be7 quartz: Process motion events within windows bounds without window set
When an NSEvent does not have the window field set, we already assumed
the event was not for us and discarded it.  But for NSMouseMoved events
we now make an exception, because such events generated after
using/clicking the main menu bar have the window field set to NULL while
the application window still has focus.

We used to experience a loss of motion events after using the menu bar,
this could be seen in buttons that stopped prelighting and first
clicks often being ignored unless you clicked somewhere else first.
These issues are fixed by this patch.
2011-11-06 10:15:16 +01:00
Kristian Rietveld
7269cdf315 quartz: Factor out toplevel from NSEvent code into function 2011-11-06 10:12:24 +01:00
Kristian Rietveld
6a7280ce1a quartz: Separate out screen_point conversion in function
Reduces code duplication and confusion.
2011-11-06 10:10:12 +01:00
Kristian Rietveld
4d9d8ba96d quartz: remove unused variable 2011-11-06 10:04:39 +01:00
Florian Müllner
79803d0edc menuitem: Always treat submenus as popup
Submenus are not actually attached to a menubar, but styling them
as if they were imposes some problems (at least with Adwaita).
Just using GDK_WINDOW_TYPE_HINT_POPUP_MENU for submenus instead
fixes the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=662691
2011-11-05 01:49:50 -04:00
Akira TAGOH
4d7e47ddd0 Allow fallback for input method modules
Accept a :-separated list of module names in GTK_IM_MODULE and
the corresponding setting, to deal a bit better with broken
situations.

https://bugzilla.gnome.org/show_bug.cgi?id=603559
2011-11-05 01:48:59 -04:00
Torsten Schönfeld
a72a3160a8 gtk: add annotations for some GtkSymbolicColor constructors
https://bugzilla.gnome.org/show_bug.cgi?id=661859
2011-11-05 01:38:40 -04:00
Rui Matos
8067f6b886 x11: Fix window manager change detection
Since the wmspec_check_window doesn't have a corresponding GdkWindow we can't
rely on the get_event_window() return value to get the XID from. Just use the
XID from the XEvent directly.

https://bugzilla.gnome.org/show_bug.cgi?id=662953
2011-11-05 01:37:37 -04:00
Benjamin Moody
8318515cd8 Mark gtk_dialog_new_with_buttons as NULL-terminated
https://bugzilla.gnome.org/show_bug.cgi?id=663073
2011-11-05 01:27:25 -04:00
Matthias Clasen
41d4229155 Pop up context menus at the right device
When multiple pointers are in play, we need to be careful
not to loose track of the device between receiving a button
press and popping up a menu.

https://bugzilla.gnome.org/show_bug.cgi?id=663396
2011-11-05 01:24:17 -04:00
Matthias Clasen
7644ef1e3a GtkWindow: Use new begin_resize_drag api
We have an event, so the correct thing to do is to pass
the device into the function that we are calling. GDK
just grew a variant that takes a device, for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=663444
2011-11-05 01:14:30 -04:00
Matthias Clasen
3b152df48a Wayland: Adapt to GdkWindowImpl api change 2011-11-05 01:12:26 -04:00
Matthias Clasen
810ef68679 Broadway: Adapt to GdkWindowImpl API change 2011-11-05 01:12:07 -04:00
Matthias Clasen
6f48f20c67 Quartz: Adapt to GdkWindowImpl api change 2011-11-05 01:11:50 -04:00
Matthias Clasen
32884e9c16 win32: Adapt to GdkWindowImpl api change 2011-11-05 01:11:18 -04:00
Matthias Clasen
250d4331b2 Add device-taking variants of begin_resize/move_drag
This was one of the last places where display->core_pointer was
used in non-deprecated code paths.
2011-11-05 01:10:16 -04:00
Matthias Clasen
3bd0059850 GdkDeviceManager: some reshuffling of docs 2011-11-04 23:38:11 -04:00
Bastien Nocera
ba397a3431 tests: Disable accel test until fixed 2011-11-04 16:40:23 +00:00
Bastien Nocera
780a92b559 gtk: Add test program for keycode parsing
https://bugzilla.gnome.org/show_bug.cgi?id=662755
2011-11-04 16:40:22 +00:00
Bastien Nocera
06b55b2149 gtk: Add accel with keycode parsing functions
Which handle accelerators with keycodes as well as keyvals,
so we can use it in applications that use GtkCellRendererAccel's
"Other" mode of operations (namely gnome-control-center and
gnome-settings-daemon).

https://bugzilla.gnome.org/show_bug.cgi?id=662755
2011-11-04 16:40:22 +00:00
Matthias Clasen
0f167e8b43 Fix make check 2011-11-03 23:58:46 -04:00
Colin Walters
6cf1385e8f introspection: Include deprecated headers for scanner too
https://bugzilla.gnome.org/show_bug.cgi?id=663345
2011-11-03 15:27:56 -04:00
Piotr Drąg
8853a3e5ff Updated POTFILES.in 2011-11-02 22:12:53 +01:00
Alexander Larsson
c002c83ec5 Make sure we only show icons in the file selector bookmarks toolbar
This looked really bad in non-gnome settings where default is to
show text too.
2011-11-02 14:46:53 +01:00
Matthias Clasen
20008c33cb Revert a change to the plug/socket headers
I was trying to avoid including gtk.h here, but this breaks
some of our tests, and there's a good chance that 3rd party
code also relies on this include.
2011-11-02 08:28:34 -04:00
Matthias Clasen
2ead4c6038 Remove some more uses of gdk_window_get_pointer 2011-11-02 08:10:42 -04:00
Matthias Clasen
cafef131d6 Remove one instance of gdk_window_get_pointer 2011-11-02 08:10:42 -04:00
Matthias Clasen
adc731fad9 Remove various internal uses of deprecated api 2011-11-02 08:10:42 -04:00
Matthias Clasen
8ad3fd28b8 Don't warn about deprecations in deprecated/ 2011-11-02 08:10:42 -04:00
Matthias Clasen
2de4405c32 Move deprecated gtkwidget style api to gtkstyle 2011-11-02 08:10:42 -04:00
Matthias Clasen
1f827d6214 Don't warn about deprecations in deprecated/
We know we are deprecated here, no need to warn.
2011-11-02 01:21:49 -04:00
Matthias Clasen
feece3c0bb Move gtkstyle and gtkrc to deprecated/
This required a somewhat more substantial include reshuffling.
Some typedefs have been moved to gtkiconfactory.h and to
gtksettings.h.
2011-11-02 01:15:21 -04:00