Behdad Esfahbod
10601b833a
[gdkcairo] Fix color premultiplication
...
https://bugzilla.gnome.org/show_bug.cgi?id=513812
2013-09-05 18:42:45 -04:00
Alexander Larsson
854f5818f8
Sync with changes in the cairo device-scale handling
...
The version of device scale that landed in upstream cairo
master already inherits the device scale in cairo_create_similar,
so no need to do that in gtk anymore.
2013-09-05 19:30:23 +02:00
Jasper St. Pierre
29dda194bb
gdkwindow-x11: Multiply opaque region rects by the window scale
...
This fixes rendering issues under HiDPI
2013-09-04 14:45:54 -04:00
Jasper St. Pierre
c6de1cd6b9
gdkframeclockidle: Add explicit fallthrough markers
...
So people reading the code don't get confused.
2013-09-03 17:59:19 -04:00
Colin Walters
0697cbb88c
build: Fix srcdir != builddir with wayland-client-protocol.h
...
In the gnome-ostree model builddir contains all generated files not in
git (unless the build system explicitly overrides that). Here the
wayland-client-protocol.h was in $(builddir)/wayland, so we need to
find it using our already extant -I$(top_builddir)/gdk, rather than
relying on same-directory lookup.
2013-09-03 17:52:38 -04:00
Giovanni Campagna
3c5d9d6889
wayland: set the wm_class on toplevel windows
...
Before mapping the window, set the title and class, to allow
application tracking by gnome-shell.
https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Giovanni Campagna
7f8bf41633
gtk-shell: extend the protocol with shell capabilities
...
Add the concept of shell capabilities, which allow the compositor
to advertise support for the app menu and the global menubar,
which are then propagated as GdkSettings.
https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Giovanni Campagna
ed9f55d521
wayland: restore support for the application menu
...
If the compositor supports the gtk-shell interface, use it to
export the application ID, dbus name and paths that can be used
for the application menu.
https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Giovanni Campagna
d34335e51c
wayland: add support for a private gtk-shell protocol
...
This protocol will be used by mutter-wayland and gtk to replace
the _GTK X11 properties for DBus names/paths.
https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Jasper St. Pierre
f07d113098
gdkwindow-x11: Correct math for filling in the _NET_WM_OPAQUE_REGION property
...
This fixes incorrect rendering under mutter and other WMs that implement
_NET_WM_OPAQUE_REGION.
2013-08-31 13:21:09 -04:00
Pavel Vasin
832e77fbb4
GdkWaylandWindow: Fix memory leak
...
https://bugzilla.gnome.org/show_bug.cgi?id=706493
2013-08-31 12:28:20 -04:00
Christian Hergert
5add9625e2
wayland: fix crash in gdk_window_wayland_get_root_coords().
...
Both root_x and root_y may be NULL, so check first before setting.
2013-08-30 00:39:18 -07:00
Emilio Pozuelo Monfort
7761e99558
wayland: trust the compositor to always send a good serial number
...
https://bugzilla.gnome.org/show_bug.cgi?id=706870
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
2013-08-28 18:18:39 +01:00
Jasper St. Pierre
08fbba4558
gdk: Add opaque region setters
...
https://bugzilla.gnome.org/show_bug.cgi?id=706922
2013-08-28 10:33:57 -04:00
Benjamin Otte
6318e5e5d1
x11: Fix compiler warning
2013-08-27 16:03:55 +02:00
Alexander Larsson
576ae1e3c9
GdkScreen: Return 1, not 1.0 for the (int) scale factor
2013-08-26 21:17:45 +02:00
Chun-wei Fan
bd59614490
gdk/win32/gdkdevice-virtual.c: Various fixes
...
...for the gdk_cursor_new_from_surface work (commit b2113b73
) where the
types of some parameters were changed, and also to silence a critical
GDK_IS_DEVICE when a menu item is selected (courtesy of LE GARREC Vincent
from bug 696756).
https://bugzilla.gnome.org/show_bug.cgi?id=705980
2013-08-26 10:30:13 +08:00
Chun-wei Fan
0e01f9cc9c
GDK/GTK on Windows: Fix build
...
Due to the work on gdk_cursor_new_from_surface (commit b2113b73
),
get_cursor_for_pixbuf() in GdkDisplayClass was converted to
get_cursor_for_surface(), which means the GDK Win32 backend needs to be
updated for the code to build and run on Windows, plus some function
prototypes and declarations/calls need to be updated as well.
https://bugzilla.gnome.org/show_bug.cgi?id=705980
2013-08-26 10:29:23 +08:00
Kristian Høgsberg
771dbe0592
wayland: Compare serial numbers correctly to avoid overflow problems
...
We have to look at the difference between two numbers, which will always
be well-defined and give the right result, even in case of integer overflow.
2013-08-23 23:15:53 -07:00
Kristian Høgsberg
384a4e6ddb
wayland: Use current serial when setting selection, not _wl_time_now()
...
The wl_data_device.set_selection request expects a serial number.
2013-08-23 23:15:53 -07:00
Kristian Høgsberg
56ac58c584
wayland: wl_data_device.enter provides a serial number, not a timestamp
2013-08-23 23:15:53 -07:00
Matthias Clasen
13f6552a7e
x11: Add EWMH workspace handling api
...
Add a few functions that give access to the EWMH workspace
properties.
2013-08-24 00:51:56 -04:00
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