Commit Graph

5418 Commits

Author SHA1 Message Date
Alexander Larsson
78dae73a30 x11: Add gdk_x11_display_set_window_scale
This lets you force a specific window scale, this is needed
for mutter to be able to disable the scaling as it needs access
to unmangled X window/screen sizes. It can also be useful to
force a specific scale in e.g. tests.
2013-08-20 11:15:08 +02:00
Alexander Larsson
66f1deef40 Enforce a fixed scale of 1 if no cairo scale support
We used to just follow the default, which would pick up scale
changes from xsettings, but that is not right if we can't
actually support scales.
2013-08-20 10:29:45 +02:00
Juan Pablo Ugarte
497f25730d gdk_window_raise (): Do not invalidate toplevel windows. 2013-08-19 08:30:40 -03:00
Matthias Clasen
f8412eca34 Revert "Deprecate and ignore the cursor blink settings"
This reverts commit b2e666bf8f.

We need to keep cursor blinking configurable for accessibility
reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=704134

Conflicts:
	gdk/win32/gdkproperty-win32.c
	gdk/x11/gdksettings.c
	gtk/gtksettings.c
	gtk/gtktextview.c
2013-08-16 22:45:13 -04:00
Ek Kato
08042ea830 Bug 705750 Quartz input method doesn't work correctly for Chinese characters
Modified from original for Gtk3.
2013-08-16 11:18:29 -07:00
Chun-wei Fan
ee0b0fa482 Bug 702144: Make gdkwin32.h a pure include-only header
Move all the system includes, defines and function prototypes into a
separate header gdkwin32misc.h, so that we could keep gdkwin32.h as simple
as possible.
2013-08-14 08:13:32 +08:00
Chun-wei Fan
9072be16a4 gdk/win32/gdkdevice-virtual.c: Don't Use Deprecated APIs
...this was split into two commits as this source file has different
line endings (for some reason) from the other GDK-Win32 source files that
were updated in the quest to refrain from using deprecated APIs
2013-08-14 08:04:50 +08:00
Chun-wei Fan
ae79dd7068 GdkWin32: Avoid Using Deprecated API
Update the Win32 GDK backend to not use the deprecated GDK APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=705068
2013-08-14 08:03:19 +08:00
Matthias Clasen
7d48c3b2c7 Add a function to get the event type
This is useful for language bindings, who can't easily
access the struct field directly.

https://bugzilla.gnome.org/show_bug.cgi?id=700029
2013-08-13 19:06:48 -04:00
Ek Kato
40c429c2cb Bug 705181 Annoying beep on arrow keys
Original patch was a bit excessive, just needed to not forward the command.
2013-08-13 11:16:03 -07:00
Jasper St. Pierre
8818d8a19b gtkwindow: Export our custom frame extents
This allows CSD windows to be maximized, tiled, and constrained
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=705765
2013-08-13 10:38:49 -04:00
Benjamin Otte
129fc6ea3a x11: Remove dead assignment 2013-08-13 16:25:27 +02:00
Matthias Clasen
87257342de Fix a crash with scaled cursors on Wayland
We need to initialize cursor->surface.scale to 1, since we
are dividing by it in _gdk_wayland_cursor_get_buffer.
2013-08-11 15:38:25 -04:00
John Ralls
dfbd0c2b98 Implement gdk_display_get_cursor_for_surface in quartz
Left out of b2113b7, breaking quartz build
2013-08-11 10:43:48 -07:00
John Ralls
31c2e95cbd Bug 701571 NSApp doesn't notice NSWindow destruction
Part 1 of the fix; part 2 awaits Glib developer approval (see
https://bugzilla.gnome.org/show_bug.cgi?id=704374) and is more
correctly associated with
https://bugzilla.gnome.org/show_bug.cgi?id=674108
2013-08-11 10:43:47 -07:00
Matthias Clasen
04d6d622d5 Try Wayland before X11
When both the Wayland and the X11 backends are built, prefer
Wayland over X11 in the absence of other information.

https://bugzilla.gnome.org/show_bug.cgi?id=705498
2013-08-09 20:50:57 -04:00
Matthias Clasen
2cdc5d440a Fix up docs for new cursor apis
The docs for gdk_cursor_new_from_surface were talking about
pixbufs. And the new APIs were not appearing in the docs
at all yet.
2013-08-09 20:24:44 -04:00
Daniel Sabo
a1955e8d88 Reset cursor when mouse leaves a toplevel window.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692548
2013-08-08 09:38:09 -05:00
Alexander Larsson
b2113b7384 gdk: Add gdk_cursor_new_from_surface
We need this to be able to handle scaled cursor images.
We implement the new _from_pixbuf by converting to a surface and
assuming the scale was 1.
2013-08-07 13:34:10 +02:00
Alexander Larsson
71fe43543c gdk: Add gdk_cursor_get_surface()
We want a surface so we can properly represent the scale factor for it.
All backends are converted to use surfaces and we reimplement the
backwards compat code in the generic code.
2013-08-07 13:34:10 +02:00
Alexander Larsson
54f5e4af53 gdk_pixbuf_get_from_surface: Avoid copying if source is image surface
If the source surface is an image surface we don't need to coerce
it to one.
2013-08-07 13:34:10 +02:00
Rob Bradford
a4d9e92f66 wayland: Dispatch pending events before entering poll
If we don't dispatch the pending events then we can enter poll with events
still requiring to be processed and which can then lead to us deadlocking
there.
2013-08-04 14:42:14 +01:00
Rob Bradford
a8fc099a72 wayland: Only try and process keyboard events when focussed
When combining Clutter with GTK+ we can receive events for surfaces which in
the client side we do not have focussed.
2013-08-04 14:42:14 +01:00
Rob Bradford
3625f17857 wayland: Only try and process pointer events when focussed
When combining Clutter with GTK+ we can receive events for surfaces which in
the client side we do not have focussed.
2013-08-04 14:42:14 +01:00
Rob Bradford
e8e6ae8189 wayland: Only process the event if it's for a GdkWindow
When we combine GTK with Clutter we will receive events for both surfaces that
we have created as well as those created by Clutter.
2013-08-04 14:42:14 +01:00
Matthias Clasen
0d999c626f Wayland: Add a missing break statement
Found by the clang static analyzer.
2013-08-04 01:27:39 +02:00
Alexander Larsson
3a0b65c5b9 x11: send monitors-changed when screen scale changes 2013-08-03 16:53:46 +02:00
Alexander Larsson
9237da2e57 x11: Update root window scale when the screen scale changes 2013-08-03 16:53:46 +02:00
Jasper St. Pierre
55edb3e2b1 gdkkeys-x11: Remove workaround code for Sun Microsystems X server
Xsun is no longer shipped to customers, and Oracle/Sun's Xorg distribution
uses "Sun Microsystems" as the vendor name, so this hack is incorrect in
the more common recent cases.
2013-08-02 09:03:10 -04:00
Chun-wei Fan
dcb766c461 Add Visual Studio Build Support for Broadway
-Add Visual Studio 2008 projects and pre-configured gdkconfig.h for
 Broadway builds
-Decouple the Visual Studio property sheets, to simplify maintenance and
 enhance flexibility for different builds

Visual Studio 2010 projects updates will follow later.
2013-08-02 11:20:19 +08:00
Benjamin Otte
7f01641280 x11: Don't crash when NULL eometry hints are set
Fixes crashers in gnome-panel.
2013-07-31 03:03:09 +02:00
Michael Hutchinson
a78643bd6f Bug 705181: Fix annoying beeping introduced by Mac IME
NSTextInputClient should not chain unhandled commands to super

(cherry picked from commit 91bcca6f39)
2013-07-30 17:27:10 -07:00
Matthias Clasen
77a20871ff X11: Fix the cut-off for too large windows
We can only handle 2^15-1 pixels, not 2^16-1.
Pointed out by Morten Welinder.

https://bugzilla.gnome.org/show_bug.cgi?id=698758
2013-07-29 20:51:39 -04:00
Murray Cumming
330f51978d docs: Minor grammatical corrections. 2013-07-29 11:51:33 +02:00
Ek Kato
fbfce31889 Bug 701332 - Patch for minor glitch in NSTextInput
(cherry picked from commit 43ed68aa33)
2013-07-27 14:09:55 -07:00
Rob Bradford
16e43733b9 wayland: Create a cairo surface for the root window
Many parts of GTK+ assume that all windows have a cairo surface
assoicated with them. This change provides a logically 1x1 cairo surface
(respecting scale) for the root window.

https://bugzilla.gnome.org/show_bug.cgi?id=704554
2013-07-24 18:30:19 +01:00
Owen W. Taylor
c7574bb6c8 Disable frame sync for GtkPlug
Plug windows weren't redrawing properly because the embedded
window was expecting to get messages for each frame from the
compositor, but the compositor doesn't know about embedded
windows. Simply disable frame sync for GtkPlug's GdkWindow -
extending XEMBED to handle frame sync isn't interesting
at this point.

A new API gdk_x11_window_set_frame_sync_enabled() is added
to allow this to be done.

https://bugzilla.gnome.org/show_bug.cgi?id=701613
2013-07-22 18:36:58 -04:00
Erik van Pienbroek
4c2d461286 Fix prototype of gdk_device_win32_warp
https://bugzilla.gnome.org/show_bug.cgi?id=704171
2013-07-22 14:23:59 +02:00
Chun-wei Fan
ce30d16da1 gdk/gdkoffscreenwindow.c: Include fallback-c89.c
This is necessary as we are using round() here, which is not universally
available.
2013-07-19 18:33:42 +08:00
Matthias Clasen
a74d394738 Add AudioMicMute
This keysym was recently added to XF86keysym.h.
2013-07-17 17:52:19 -04:00
Jasper St. Pierre
e08f074bd2 gdkkeysyms-update: Remove workarounds for old bugs 2013-07-17 16:40:05 -04:00
Jasper St. Pierre
585bee3fa7 gdkkeysyms-update: Just overwrite gdkkeysyms.h 2013-07-17 16:27:49 -04:00
Giovanni Campagna
047d60e797 gdk/wayland: cope with the compositor implementing an older protocol than us
If we bind to a global with an higher version than implemented, or
we make requests that appeared in a later version, we would get
fatal wayland errors.

https://bugzilla.gnome.org/show_bug.cgi?id=704104
2013-07-16 18:19:08 +02:00
William Hua
947385ebae Bug 704216: Fix prototype for gdk_quartz_device_core_warp. 2013-07-15 10:18:22 -07:00
William Jon McCann
57fc8763e9 Deprecate and ignore the timeout-initial and timeout-repeat settings 2013-07-11 17:08:15 -04:00
Matthias Clasen
f636a2668b Don't segfault when setting opacity on an offscreen window
This was causing the treeview tests to fail.
2013-07-09 20:05:46 -04:00
Rob Bradford
af26a18032 wayland: Handle the display connection erroring out
wl_display_flush or wl_display_dispatch can return -1 if there is an
error on the display connection.

https://bugzilla.gnome.org/show_bug.cgi?id=703892
2013-07-09 18:52:56 -04:00
Kristian Høgsberg
99b78fdd7f wayland: Don't clear revents until we've checked for G_IO_HUP
https://bugzilla.gnome.org/show_bug.cgi?id=703892
2013-07-09 18:38:32 -04:00
Rob Bradford
0dbd9dc0a7 wayland: request appropriate compositor version to support buffer scale
With the introduction of the use of buffer scaling in ed4fcee4ct we
must request version 3 of the compositor as that is the version of the
surface interface that adds this new functionality. See the following
commit in weston:

commit a85118c1b85df6fbf8f896dca971a5b79a94da71
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Thu Jun 27 20:17:02 2013 -0500

    Use wl_resource_create() for creating resources

    This commit sets the version numbers for all added/created objects.  The
    wl_compositor.create_surface implementation was altered to create a surface
    with the same version as the underlying wl_compositor.  Since no other
    "child interfaces" have version greater than 1, they were all hard-coded to
    version 1.

    Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>

https://bugzilla.gnome.org/show_bug.cgi?id=703817
2013-07-09 10:11:58 +01:00
Emmanuele Bassi
9f2ca8d851 gdk: Use new macros for defining private data
Drop the g_type_class_add_private() function, and use the macros
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:28:49 +01:00