Commit Graph

21295 Commits

Author SHA1 Message Date
Kristian Rietveld
013c9169f6 Bug 661997 - Gtk crashes when changing the TreeView model while ...
Simply stopping rubber banding in gtk_tree_view_set_model() eliminates
the crash.  Reported by Thomas Perl.
(cherry picked from commit 91ae19768e)
2011-11-09 08:49:12 +01:00
Michael Natterer
3b5c5710da quartz: include all buttons' state in GdkEventMotion.state 2011-11-09 00:34:45 +01:00
Michael Natterer
a381e8ea62 quartz: include all buttons' states in GdkEventButton.state 2011-11-09 00:25:01 +01:00
Michael Natterer
d8cf87983e Bug 663605 - Fix event->state of many event types on quartz
Don't try to remember the current keyboard modifier and mouse button
states from the last event, because that isn't always right, and don't
set event.state = 0 for generated events. Instead, add private functions
to get the current states, and implement them with API that retrieves
these states independently from an event.
2011-11-08 21:46:30 +01:00
Matthias Clasen
7e1e5451d4 Don't use deprecated Pango api 2011-11-08 12:40:58 -05:00
Matthias Clasen
e4cee92e22 Don't use deprecated Pango api 2011-11-08 12:40:48 -05:00
Cosimo Cecchi
5a03f4a6a5 iconview: layout items immediately when setting a GtkTreeModel
As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=663138
2011-11-08 12:40:31 -05:00
Matthias Clasen
b424735a39 Print dialog: small keynav improvement
Mark the page range entry and the copies spin button as
activates-default.

https://bugzilla.gnome.org/show_bug.cgi?id=662670
2011-11-08 12:40:11 -05:00
Matthias Clasen
0f22ef3f31 GtkSearchEngineTracker: port to tracker 0.12
We simply use the Tracker DBus api here, caching and direct
access that come with libtracker-sparql are probably not needed
here. Based on a patch by Martyn Russell.

https://bugzilla.gnome.org/show_bug.cgi?id=658272
2011-11-08 12:36:23 -05:00
Antoine Jacoutot
4a22e2ceab gtkmountoperation-x11: unbreak compilation on OpenBSD.
Add missing header to prevent undeclared definitions.
Bug #659565
2011-11-08 12:31:46 -05:00
Richard Hughes
6a4a78d6a2 Fix a segfault if the GAppInfo does not have an icon
This fixes the following backtrace:

 0  g_logv (log_domain=0x7ffff60461a4 "GLib-GObject", log_level=<optimized out>,
    format=0x7ffff599c322 "%s: assertion `%s' failed", args1=0x7fffffffc418) at gmessages.c:577
 1  0x00007ffff59312d2 in g_log (log_domain=<optimized out>, log_level=<optimized out>,
    format=<optimized out>) at gmessages.c:591
 2  0x00007ffff601c3c7 in g_object_ref (_object=0x0) at gobject.c:2648
 3  0x00007ffff7721e22 in gdk_x11_app_launch_context_get_startup_notify_id (context=<optimized out>,
    info=0x7fffe8004b40, files=<optimized out>) at gdkapplaunchcontext-x11.c:331
 4  0x00007ffff62e60d0 in _g_desktop_app_info_launch_uris_internal (appinfo=0x7fffe8004b40, uris=0x0,
    launch_context=0x7fffe401c800, spawn_flags=G_SPAWN_SEARCH_PATH, user_setup=0, user_setup_data=0x0,
    pid_callback=0, pid_callback_data=0x0, error=0x7fffffffc848) at gdesktopappinfo.c:1269
 5  0x00007ffff62e630a in g_desktop_app_info_launch_uris (appinfo=<optimized out>, uris=<optimized out>,
    launch_context=<optimized out>, error=<optimized out>) at gdesktopappinfo.c:1341
 6  0x00007ffff62e636b in g_desktop_app_info_launch (appinfo=0x7fffe8004b40, files=<optimized out>,
    launch_context=0x7fffe401c800, error=0x7fffffffc848) at gdesktopappinfo.c:1388
2011-11-08 12:29:11 -05:00
Chun-wei Fan
278325f611 msw_style.c: Use G_PI rather than M_PI
M_PI is not universally available...
2011-11-08 12:37:15 +08:00
Chun-wei Fan
7e8d3aa812 Update GTK+ DLL Visual C++ projects
Include the MS-Windows themes engine into the main GTK+ DLL in the build
2011-11-08 11:09:56 +08:00
John Ralls
fadc82ad26 [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.
2011-11-07 13:41:14 -08:00
Michael Natterer
32b70a56d1 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.
(cherry picked from commit ac943bf69a)
2011-11-07 20:19:05 +01:00
Alexander Larsson
c3601481b7 Merge branch 'gtk-2-24-win32' into gtk-2-24 2011-11-07 15:07:01 +01:00
Dieter Verfaillie
fe67f04a16 win32: fix scrolling artifacts
When scrolling a window partially obscured by another window,
artifacts of the obsuring window where being blitted into
the newly scrolled position. In other words, BitBlt copies
the covered region (basically garbage instead of what we want)
and does not cause a repaint (unlike how XCopyArea behaves).

Replacing BitBlt() with the old ScrollDC gymnastics (removed from
blit_inside_window() in commit e96a41be45)
when being passed a Window for blit_inside_drawable() makes these
artifacts go away.

Thanks to Alexander Larsson for figuring out the cause and
pointing out possible solutions.
2011-11-07 14:56:38 +01:00
Michael Natterer
6f4a6b4936 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.
2011-11-06 23:12:57 +01:00
Kristian Rietveld
5123ad079e quartz: make gdk_quartz_osx_version conform to coding style 2011-11-06 09:34:39 +01:00
Kristian Rietveld
ff75900b53 quartz: make test_resize () conform to coding style 2011-11-06 09:33:50 +01:00
Kristian Rietveld
6725dee3aa 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 09:25:16 +01:00
Kristian Rietveld
d0e5025694 quartz: Factor out toplevel from NSEvent code into function 2011-11-05 22:53:22 +01:00
Kristian Rietveld
cca1621e71 quartz: Separate out screen_point conversion in function
Reduces code duplication and confusion.
2011-11-05 22:45:05 +01:00
Kristian Rietveld
0f7c96b619 quartz: remove unused variable 2011-11-05 22:39:57 +01:00
Dieter Verfaillie
a37c466698 win32: fix pasting screenshots taken with PrintScreen or Alt+PrintScreen
These are found on the clipboard in the biCompression == BI_BITFIELDS &&
biBitCount >= 16 format. In this case the BITMAPINFOHEADER is followed
by three DWORD specifying the masks of the red green and blue components,
but bfOffBits was not being adjusted accordingly.

Based on Massimo's comment on bug 631384 and verified on
http://msdn.microsoft.com/en-us/library/dd183386%28v=VS.85%29.aspx

https://bugzilla.gnome.org/show_bug.cgi?id=631384
2011-11-04 15:37:52 +01:00
Dieter Verfaillie
a8e820aa75 win32: fix some typos 2011-11-04 15:37:51 +01:00
Chun-wei Fan
b7d734bb30 Update VS property sheets
Don't use G_DISABLE_DEPRECATED, so that builds with newer stable GLib
versions would not be broken as a result.
2011-11-03 22:38:00 +08:00
Michael Natterer
0a0fd5af99 Bug 662633 - Scheduled transaction editor crashes with gtk+-2.24.7
Fix commit a516d2359c: check if
priv->arrow_button exists in forall().
2011-11-02 20:27:39 +01:00
Alexander Larsson
985fff354d win32: Fix some warnings 2011-11-02 16:49:55 +01:00
Alexander Larsson
6cb04372f0 win32: Hack to make statusbar menus show up visible: 2011-11-02 16:11:54 +01:00
Alexander Larsson
e943d7d8e1 Don't show text in file selector bookmark toolbar
The text is empty anyway.
2011-11-02 14:48:21 +01:00
Alexander Larsson
3cd9920e14 win32: Ensure newly mapped toplevels are inside the workarea
This is what e.g. metacity does, and its needed to e.g. get the inital
position of the gimp dock window right.
2011-11-02 14:30:23 +01:00
Alexander Larsson
f7438ce4e4 win32: Fix placement at initial position
Positioning windows at 0,0 post creation failed, because it
was mapped with CW_USEDFAULT, but private->x/y still said 0,
so moving it to 0,0 did nothing. We now always position the
window at the right place, even when not mapped, but we
create it at CW_USEDEFAULT initially and store that position
before moving it to the right place.

This fixes the window sizing test in testgtk and the inital
position for the gimp toolbar.
2011-11-02 12:15:53 +01:00
Alexander Larsson
1a624ea818 win32: Fix synaptics trackpad issues
The synaptics trackpad driver has some weird behaviour on scroll.
It pops up a window over the mouse pointer (looking like a scrollbar).
This has two problems:
* We get extra enter/leave events for the trackpad window
* We get back the trackpad window when we look for the window
  under the mouse to deliver the mousewheel message.

So, we add some trackpad specific hacks to avoid this (sigh) based
on the trackpad window window class.

This fixes bug #542777 and was partially based on a patch there
from Peter Clifton.
2011-11-01 22:25:26 +01:00
Egon Elbre
718af6870f fix: win32 tilt axis range 2011-11-01 21:25:14 +01:00
Alexander Larsson
c88ccc632a Make print-editor test use double buffering in preview
This makes preview work on win32
2011-11-01 21:07:14 +01:00
Alexander Larsson
49d017dcb9 win32: Default to MS-Windows theme
It really makes little sense to not look like windows apps on windows.
If you really want you can change this via a .gtkrc-2.0 file
2011-11-01 14:23:44 +01:00
Alexander Larsson
8f6f64fe10 win32: Make WINTAB support work
Lots of rework to make input events work in the csw world
2011-11-01 12:38:15 +01:00
Martin Renold
2cd09a6653 win32: fix invalid cast 2011-10-28 11:16:57 +02:00
Alexander Larsson
2090e37ffb win32: Fix ms-windows theme to not create native subwindows
GDK_WINDOW_HWND() calls from outside gdk calls ensure_native_window,
but we really want the HWND of the impl window, so call
the new gdk_win32_window_get_impl_hwnd() instead.
2011-10-28 11:06:59 +02:00
Alexander Larsson
26b97f63c9 win32: Add gdk_win32_window_get_impl_hwnd
This is needed to fix the ms-windows theme not to create
native windows for all child windows.
2011-10-28 11:05:53 +02:00
Michael Natterer
e81b6971d8 gtkrc.key.mac: add '"' missing from last commit 2011-10-28 10:19:24 +02:00
Morten Welinder
afce8c7341 win32: Actually check for IPrintDialogCallback in configure 2011-10-28 09:10:40 +02:00
Alexander Larsson
4b5b28b64f win32: Fix modal_hint handling
Modal hints are not really a stack. All windows that are modal
are allowed to get input, not just the top one.

This fixes bug #604156
2011-10-27 22:13:54 +02:00
Alexander Larsson
6d1b818560 win32: Don't use API_CALL for SetWindowLong
This can return 0 without it being an error.
Should fix the last issue with bug #142874
2011-10-27 21:12:32 +02:00
Alexander Larsson
47095f97d2 win32: Make flush/sync work like in X
gdk_flush() should gdk_display_sync() on all open displays.

Both for display_flush and display_sync it seems useful to call
GdiFlush, but we don't have anything extra to do for display_sync,
as there is no inherent roundtrip on win32.

This should close bug #84314
2011-10-27 21:12:31 +02:00
Alexander Larsson
8588944cb9 win32: Add custom placements for some window types
Windows with transients: center on parent
Splash screens: center on monitor
Also properly ignores initial moves of unmapped
windows that are not override redirect or HINT_POS

Fixes bugs #324254 and #612359
2011-10-27 21:12:24 +02:00
Alexander Larsson
ac00340d4c win32: More robust way to ensure we get a configure event after move/resize
There were still cases where we didn't get a WINDOWPOSCHANGED after
a SetWindowPos() call, like e.g. with a larger minimum size than
the set size (bug #574935)

So, we revert the previous fix and now just always manually emit
a configure notify after the move_resize call. Also, we inhibit
the WINDOWPOSCHANGED configure event during the move_resize operation
to avoid multiple Configures.
2011-10-27 10:42:07 +02:00
Alexander Larsson
f44c6d66bf win32: Ensure we always send a configure event when changing size/pos
There are some cases where we don't get a WINDOWPOSCHANGE such that
we generate a configure event, even if we called gdk_window_move_resize()
or similar. For instance:
* The window is fullscreen
* The window is maximized
* The specified pos/size is the same as the current one

However, as per X11 ConfigureNotify semantics we *always* want one, or
we could run into issue like e.g. bug #537296 where we're waiting for
the CONFIGURE to call gdk_window_thaw_toplevel_updates_libgtk_only().
2011-10-26 21:46:19 +02:00
Alexander Larsson
4f9e1dd414 win32: By default, allow windows larger than the screen 2011-10-26 21:44:49 +02:00