Commit Graph

3119 Commits

Author SHA1 Message Date
Cody Russell
53ab5c0b63 Add gdk_screen_get_primary_monitor to gdk.symbols 2009-12-09 23:20:30 -06:00
Cody Russell
662e69ad3e Add gdk_screen_get_primary_monitor(). This fixes bug #601712 2009-12-08 11:27:02 -06:00
Matthias Clasen
0748cf563d Never do implicit paints for foreign windows
They don't need double buffer combination since they have no
client-side children, and creating pixmaps for them is risky
since they could disappear at any time.

May fix bug 598476 and 603652.
2009-12-08 10:09:04 -05:00
Matthias Clasen
105b007545 Set colormap of offscreen pixmaps
This fixes problems in clutter-gtk. See bug 603619.
2009-12-08 09:58:23 -05:00
Alexander Larsson
22d1d0d507 Fix up last commit 2009-12-08 12:28:44 +01:00
Alexander Larsson
159214173d Handle input extension events when making a window native
It may happen when turning a client side window into a native window
that the window, or some of its children with the same native parent
have extension events enabled, and thus have an input window enabled
for the native parent which needs to change as the window is made
native.

We fix this by temporarily disabling extension events on all the affected
windows while we create the native window, and then reenable them afterwards.

This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=544624
2009-12-08 12:22:59 +01:00
Alexander Larsson
98a9c5c69a Fix damage report for lines drawn on offscreen windows
All kinds of lines (lines, segments, arcs, etc) need to take into
account the line properties (width, miter limit, joins, caps, etc)
to get proper damage extents.

This is not really possible to do, but we can make it likely to work
with some ad-hoc estimates.

Fixes bug 603904.
2009-12-07 10:49:57 +01:00
Alexander Larsson
48fc0f36c2 Fix mouse pointer handling on multiple screens
The fix in 786b589d95 for the
"Cannot click buttons more than once without moving the mouse cursor"
did not correctly handle setups with multiple screens in one display.

We need to handle the case where the first XQueryPointer returns
a different root window than the default one.

This fixes bug 597386 (agaion)
2009-12-07 10:49:57 +01:00
Alexander Larsson
b509f28559 Don't filter out BUTTON_MOTION event masks
We don't really need to filter these out, it was just a leftover
safety check to not override the GDK_POINTER_MOTION_MASK.

Furthermore when we changed behaviour to not always select for native
pointer motion it is actually wrong. We'll still get normal motion
events for the toplevel which we will emulate as button motion on the
child, but the button motion mask will not be inherited by implicit
grabs which makes us not get any motion events during grabs.

This fixes bug 601473
2009-12-02 11:19:21 +01:00
Javier Jardón
ee2c797e70 [gdk/directfb] Made dfb_events_dispatch() thread save
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=591438
2009-11-30 06:02:49 +01:00
Matthias Clasen
36ca3fd5e9 Add a missing include
memset() is used in gdk/x11/gdkinput-xfree.c but string.h is not included.
Patch by Vincent Untz, bug 597026.
2009-11-27 20:59:42 -05:00
Matthias Clasen
43a07af9b1 Be a bit more forgiving about invalid monitor number
By moving the g_return_if_fail() checks into individual monitor functions.
See bug 561130.
2009-11-27 18:39:15 -05:00
Matthias Clasen
5bfab2b9d4 Short-circuit get_frame_extents for override-redirect windows
There's no reason to do our expensive round-trips for an override-redirect
window; just use local information. See bug 581145. Patch by Owen Taylor.
2009-11-27 18:19:20 -05:00
Matthias Clasen
d4b92737ab Make level3 keys work again
We were not paying attention to consumed modifiers when adding
virtual modifiers. This fixes RH bug 537567.
2009-11-25 01:02:40 -05:00
Kristian Rietveld
cffddd2adc Document how Cocoa coordinate and monitor layout transforms to GDK work 2009-11-15 15:29:45 +01:00
Tor Lillqvist
7fda8e6378 Awful hack for problem in dnd of images from Firefox on Windows
Bypassed with #if 0 because it is an awful hack and not really
acceptable from a privacy point of view for instance. It prevents
Firefox from deleting temporary files containing images being dragged,
so they stay on disk. Bug #561973.
2009-11-15 00:37:17 +02:00
Kjartan Maraas
d03b53800e Fix typo 2009-11-11 21:39:32 +01:00
Javier Jardón
ecc3065f76 Only use gdk_input_select_events() if XINPUT_NONE is defined
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=601337
2009-11-11 17:42:20 +01:00
Javier Jardón
cd2ff792ca [gdk] Added GDK_GPOINTER_TO_NATIVE_WINDOW() macro
GdkNativeWindow cast is needed in 64-bit Windows so gpointer data
is converted to a (64-bit) native window handle.
GPOINTER_TO_UINT() is used in other platforms.
2009-11-10 20:15:37 +01:00
Javier Jardón
7d1c8fa644 [gdk/x11/gdkdnd-x11] Add missing "Deprecated: 2.x" to the api doc comments. 2009-11-06 03:41:02 +01:00
Javier Jardón
0d55c6ede1 [gdk/gdkimage] Add missing "Deprecated: 2.x" to the api doc comments. 2009-11-06 03:37:56 +01:00
Javier Jardón
7bc07ffe86 [gdk/gdkgc] Add missing "Deprecated: 2.x" to the api doc comments. 2009-11-06 03:30:31 +01:00
Javier Jardón
925fa99393 [gdk/gdkdraw] Add missing "Deprecated: 2.x" to the api doc comments. 2009-11-06 03:26:27 +01:00
Javier Jardón
64d054264e [gdk/gdkcolors] Add missing "Deprecated: 2.x" to the api doc comments. 2009-11-06 03:16:34 +01:00
Javier Jardón
8082aad271 Use "Deprecated:" gtk-doc symbol corrently
Also, added some suggestion about replacements for deprecated functions
2009-11-06 03:03:40 +01:00
Nicola Fontana
1e1131c959 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600158
2009-11-06 01:21:09 +01:00
Alexander Larsson
9e51c10edc Don't unnecessarily clear windows with no exposure mask set
When we just invalidate some area from the app we don't need to clear
windows with no exposure mask, because that wouldn't have happened pre-csw
anyway. Additionally we can avoid such clearing for native windows in cases
where the xserver already did the clearing like on exposes or when resizing
toplevels.

This means we don't fully redraw a GtkSocket when it resizes, thus
avoiding flicker in gnome-mplayer as reported in this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=598050
2009-11-05 12:52:12 +01:00
Alexander Larsson
9ae0d9a44f Document clears_as_native and make the name more descriptive 2009-11-05 12:52:12 +01:00
Alexander Larsson
39993f147f Add supports_native_bg to GdkWindowImpl
Backends that support native window background setting (and that clears
new window areas to this color/pixmap) should set this to true.

Currently only X11 supports this.
2009-11-05 12:52:12 +01:00
Alexander Larsson
4cd5c98942 Don't unnecessarily expose areas copied by native windowing system
When moving or scrolling a window with native children, there is no
need to expose the areas that are copied by the windowing system
as part of moving/resizing the native windows anyway.
2009-11-05 12:52:12 +01:00
Alexander Larsson
a299797883 Only send exposes on unmap if window really was unmapped
Exposing when you hide a hidden window is just a waste of time.
2009-11-05 12:52:12 +01:00
Alexander Larsson
8c1ea38d84 Flush outstanding stuff when clearing directly on a window
Clearing will directly modify the contents of the window, so we need
to flush any outstanding moves or double-buffering.
2009-11-05 12:52:11 +01:00
Javier Jardón
3dbfc08a7a Fix some compilation warnings
Fixed the prototypes of MyEnhancedXkbTranslateKeyCode() and
translate_keysym() to take a gint* because those functions treat
these arguments as an int, so we get around the need to cast.
2009-10-30 18:33:16 +01:00
Javier Jardón
d76287c94b Fix warning: cast to gchar* 2009-10-30 04:04:28 +01:00
Javier Jardón
c368c6e425 Use G_STRLOC instead __LINE__ 2009-10-26 18:19:48 +01:00
Javier Jardón
a667ee8e5e Use G_STRFUNC instead __FUNCTION__ 2009-10-26 18:17:23 +01:00
Kristian Rietveld
a338c7e929 Update copyright 2009-10-26 09:57:11 +01:00
Kristian Rietveld
fa8fa48ef1 Update position of toplevels after display reconfiguration
We have to do this, especially after the screen containing the menubar
has changed.  Such more larger changes in monitor geometry will cause
changes to how monitors are laid out in the root window.  The position
coordinates of the windows will have to be updated to reflect their
position in the new layout.
2009-10-26 09:52:54 +01:00
Kristian Rietveld
a4d932cc64 Fixup get_nsscreen_for_x() 2009-10-26 09:52:54 +01:00
Kristian Rietveld
221883dd31 Remove unused variable (fix compiler warning) 2009-10-26 09:52:54 +01:00
Kristian Rietveld
93530675de Update size of root window after display reconfiguration 2009-10-26 09:52:54 +01:00
Kristian Rietveld
959a9437e6 Support arbitrary screen layouts
The Quartz port now supports arbitrary multiple monitor layouts instead
of only monitors are were laid out horizontally.  This builds on the
reworked coordinate translation done in a previous commit.
2009-10-26 09:52:54 +01:00
Kristian Rietveld
8846012c6d Rework coordinate transformation to be based on root window
The root window contains all the monitors attached to a Mac.  The
coordinate transformation now both translates the x and y coordinate,
translating it from the Cocoa monitor coordinate space to the GDK
coordinate space.  How monitors are laid out in the root window differs
between Cocoa and GDK, which is why it is important to translate based
on the root window to get multi monitor setups to work properly.

We have replaced the old y coordinate transformation function with
new functions that translate both the x and y coordinate.

When creating new toplevels, we have to determine the Cocoa screen on
which the toplevel should appear and translate the coordinates according
to that screen.

This change also fixes event handling in case there is a monitor left
of the screen containing the menu bar.  In such a case all coordinates
on the left monitor are negative.  Event handling broke, because of
_gdk_quartz_window_find_child() checking bounds.  Now that coordinates
are always properly translated to GDK coordinate space, in which negative
coordinates do never occur, the checks here will work properly.
2009-10-26 09:52:54 +01:00
Kristian Rietveld
d26dd103b2 Be consistent with X11: emit monitors-changed first, then size-changed 2009-10-26 09:52:53 +01:00
Kristian Rietveld
aa25e4a51c Update documentation for ::monitors-changed to mention OS X support 2009-10-26 09:52:53 +01:00
Kristian Rietveld
e36872da38 Use screen when emitting signal, not _gdk_screen 2009-10-26 09:52:53 +01:00
Kristian Rietveld
63e2f54516 Emit monitors-changed signal when appropriate 2009-10-26 09:52:53 +01:00
Kristian Rietveld
12dc617dc2 Move screen resolution setup to GdkScreenQuartz initializer 2009-10-26 09:52:53 +01:00
Kristian Rietveld
d47772f002 Create a proper subclass of GdkScreen: GdkScreenQuartz 2009-10-26 09:52:52 +01:00
Kristian Rietveld
73b55ae8f5 Register and handle a display reconfiguration callback
Using this we can update our internal monitor/screen layout state
and emit the GdkScreen::size-changed signal.  Work has not
completely finished on this yet, see bug 596238.
2009-10-26 09:52:52 +01:00