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
Jürg Billeter
7f9f3aad5a
wayland: Fix build due to missing symbol export
...
https://bugzilla.gnome.org/show_bug.cgi?id=703765
2013-07-09 07:09:13 +02:00
William Jon McCann
7b66956e63
Deprecate and hardcode default toolbar icon size setting
...
Toolbar icon size can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
425e977bb6
Deprecate and hardcode default toolbar style setting
...
Toolbar style can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
c9bfd12d2f
Deprecate and hardcode the value of visible-focus setting
...
Just use the default value of AUTOMATIC and make it just work.
2013-07-08 15:01:33 -04:00
Rob Bradford
d2ba7d75c3
wayland: Create the Wayland surface for the window on impl creation
...
Ths allows the retrieval of the wl_surface before the window is shown.
The surface is still created in the original places since the surface
and shell surface is destroyed when the surface is programmatically
hidden.
2013-07-03 16:26:00 +01:00
Michael Forney
ce9f232eb8
wayland: Fix typo in setting of core_pointer
...
This typo caused the display's core_pointer to be set only if the mouse
was first in the device list.
https://bugzilla.gnome.org/show_bug.cgi?id=703434
2013-07-03 15:24:50 +01:00
Alexander Larsson
83c5e354bd
wayland: Add custom create_similar_image implementation
...
The fallback method is used on other backends, but it caused
problems for wayland when it tried to create a surface for
the root window.
2013-07-03 16:03:25 +02:00
Alexander Larsson
e8b38fedbd
gdk: Convert mouse position to doubles, add new getters
...
We've long had double precision mouse coordinates on wayland (e.g.
when rotating a window) but with the new scaling we even have it on
X (and, its also in Xinput2), so convert all the internal mouse/device
position getters to use doubles and add new accessors for the
public APIs that take doubles instead of ints.
2013-07-03 14:39:25 +02:00
Alexander Larsson
867ba1df27
x11: Don't follow dpi and scale from xsettings when GDK_SCALE set
...
If things are hardcoded in the environment, that wins.
2013-07-03 14:36:05 +02:00
Alexander Larsson
4b9c08f48d
x11: Add Gdk/UnscaledDPI to override Xft/DPI
...
This lets use use a scaled Xft/DPI for old apps while not
blowing up the size of scaled windows. Only apps supporting
Gdk/WindowScaleFactor should supprt Gdk/UnscaledDPI.
2013-07-03 14:34:25 +02:00
Alexander Larsson
d89a98e31e
x11: Support the Gdk/WindowScalingFactor xsetting
...
This xsetting can be used to tell Gtk to use a specific window
scaling for the screen.
2013-07-03 14:34:14 +02:00
Alexander Larsson
525e5cff04
x11: Initial cut at supporting window scaling for X11
...
If you set GDK_SCALE=2 in the environment then all windows will be
scaled by 2. Its not an ideal solution as it doesn't handle
multi-monitors at different scales, and only affects gtk apps.
But it is a good starting points and will help a lot on HiDPI
laptops.
2013-07-03 14:34:14 +02:00
Alexander Larsson
ed4fcee4c6
wayland: Support gdk_window_get_scale
...
We track the list of outputs each window is on, and set the
scale to the largest scale value of the outputs. Any time the scale
changes we also emit a configure event.
2013-07-03 14:34:13 +02:00
Alexander Larsson
ce68a2f870
wayland: Implement gdk_screen_get_monitor_scale()
...
We bind to the newer version of the wl_output which supports
the new done and scale events, and if we use this to get the
scale for each monitor (defaulting to 1 if not supported).
2013-07-03 14:34:13 +02:00
Alexander Larsson
8524e0c150
gdk: Add gdk_cairo_surface_create_from_pixbuf
2013-07-03 14:34:13 +02:00
Alexander Larsson
04f83a56a2
gdk: add gdk_window_create_similar_image_surface
...
This lets us create image surfaces that render faster on specific windows.
It also supports creating scaled image surfaces.
2013-07-03 14:34:13 +02:00
Alexander Larsson
56bec0c70c
gdkwindow: Respect cairo surfaces with device scale
...
If a cairo_surface for a window has a device scale set we need
to respect this when creating a similar window. I.e. we want
to then automatically create a larger window which inherits
the scale from the original.
We also need to calculate a different device_offset if there
is a device_scale set.
2013-07-03 14:34:13 +02:00
Michael Natterer
d4607be003
quartz: Implement get_scale_factor() on screen and window
2013-07-03 14:34:13 +02:00
Alexander Larsson
30080faf2b
offscreenwindow: Handle window_scale
...
We create similar windows in the right way to get the
device scale right.
2013-07-03 14:34:13 +02:00
Michael Natterer
8ad851f725
add gdk_screen_ and gdk_window_get_scale_factor()
...
These report the internal scaling factor, mapping from UI pixels
to hardware pixels.
2013-07-03 12:27:10 +02:00
Alexander Larsson
995a7e95b9
win32: Remove unused functions
...
The _gdk_windowing_* stuff is not used anymore
2013-07-03 12:27:10 +02:00
Alexander Larsson
aa3f0f8ec9
quartz: Remove unused functions
...
The _gdk_windowing_* stuff is not used anymore
2013-07-03 12:27:10 +02:00
Alexander Larsson
09a975a765
gdk: Fix shaped toplevels
...
We need to apply the shape for toplevels that have a shape.
https://bugzilla.gnome.org/show_bug.cgi?id=702831
2013-07-01 15:34:15 +02:00
Chun-wei Fan
2268e9d6c9
Broadway: Allow Compilation on Windows/MSVC
...
-Don't include unistd.h unconditionally as it's not available in Visual
Studio, but include io.h where necessary.
-Avoid C99isms, and use _chsize_s in place of ftruncate when unistd.h is
not available (as in the case of Visual Studio)
2013-07-01 14:51:03 +02:00
Tarnyko
4b49c44b0a
win32: Make broadway build
2013-07-01 14:46:25 +02:00
William Jon McCann
85c0614707
Remove gtk-im-status-style and gtk-im-preedit-style from GDK as well
2013-06-30 13:45:43 -04:00
William Jon McCann
7ca327c9bb
Deprecate the unused gtk-file-chooser-backend setting
2013-06-30 13:44:24 -04:00
Matthias Clasen
894b1ae76a
Avoid integer overflow
...
Use g_malloc_n in gdk_cairo_set_source_pixbuf when allocating
a large block of memory, to avoid integer overflow.
Pointed out by Bert Massop in
https://bugzilla.gnome.org/show_bug.cgi?id=703220
2013-06-29 22:06:54 -04:00
Matthias Clasen
dfa2e91cd7
GdkScreenX11: Dispose visuals
...
If we let them hold onto their X resources until finalize,
it is too late.
2013-06-29 19:23:23 -04:00
Matthias Clasen
42e45f4f75
GdkVisualX11: Add a dispose implementation
...
We need to be able to drop X resources before finalization.
2013-06-29 19:22:51 -04:00
Matthias Clasen
459e10196d
GdkDeviceManagerXI2: chain up in constructed
...
Dispose does chain up, and the parent class' dispose expects
that the object has been fully constructed.
2013-06-29 19:21:28 -04:00
William Jon McCann
e779e04bc2
Deprecate and ignore gtk-icon-sizes setting
...
We don't have icons rendered at arbitrary sizes and we have better
APIs that aren't restricted to GtkIconSizes.
2013-06-26 18:04:27 -04:00
William Jon McCann
3e96625411
Remove the rest of gtk-touchscreen-mode
2013-06-26 15:35:47 -04:00
William Jon McCann
b26c74e5da
Deprecate and ignore gtk-menu-bar-accel setting
...
Use 'F10' by default.
2013-06-26 14:21:44 -04:00
William Jon McCann
aa78c888eb
Deprecate and ignore gtk-fallback-icon-theme
...
The standard icon themes have built in fallbacks.
2013-06-26 12:47:43 -04:00
William Jon McCann
b2e666bf8f
Deprecate and ignore the cursor blink settings
...
And hardcode them to reasonable values.
2013-06-26 12:32:31 -04:00
William Jon McCann
2d79334bb0
Deprecate and ignore gtk-can-change-accels
...
It is disabled by default
2013-06-26 12:00:42 -04:00
William Jon McCann
7e3a494fac
Deprecate and ignore gtk-enable-mnemonics and gtk-auto-mnemonics" properties
...
They are both enabled by default.
2013-06-26 11:16:12 -04:00
William Jon McCann
e8147d15f7
Deprecate and ignore gtk-menu-images setting
...
GtkImageMenuItem images can still be enabled selectively by the app author
using the always-show-image property on the item.
2013-06-26 10:53:09 -04:00
Rob Bradford
bfe87c44a8
wayland: Add missing symbol export
...
gdk_wayland_window_set_use_custom_surface was not being exported
correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=695861
2013-06-26 15:09:51 +01:00
William Jon McCann
65c31629c3
Deprecate and ignore gtk-button-images setting
...
Button images can still be enabled selectively by the app author
using the always-use-image property on the button.
2013-06-26 09:15:22 -04:00
John Lindgren
5fa0da4200
window: Make process_updates faster
...
Only look at "impl" windows in gdk_window_process_updates_with_mode()
since these are the only ones we care about. This avoids a lot of
unnecessary calls to g_list_copy() and g_object_ref().
2013-06-26 10:03:51 +02:00
Alexander Larsson
c40155c8e6
gdkwindow: Don't recurse into clipped children when updating
...
We don't want to recurse into children that are clipped, as that is
wasted work. We handle this by moving the empty check to the top
of the function and only using the clipped region everywhere.
2013-06-25 10:07:49 +02:00
John Lindgren
6eea6ddcc3
Optimize gdk_x11_screen_supports_net_wm_hint()
...
Move the call to gdk_x11_atom_to_xatom_for_display() outside of the
search loop in gdk_x11_screen_supports_net_wm_hint(). In my test case
(running Audacious for about a minute), this reduced the total number of
hash table lookups performed from 370,000 to 230,000.
https://bugzilla.gnome.org/show_bug.cgi?id=702913
2013-06-23 21:25:26 +02:00
William Jon McCann
1b3f9df361
Remove rest of gtk-show-input-method-menu and gtk-show-unicode-menu
...
They are no longer used.
2013-06-21 08:59:32 -04:00
Michael Natterer
e5e17cf361
quartz: remove check for keymap changes from update_keymap()
...
The function is now only called when the keymap has actually
changed. bug #698183 .
(cherry picked from commit e62709da2e
)
2013-06-20 17:27:24 +02:00
Michael Natterer
bbe3554fa9
quartz: update the keymap only if the input method changed
...
and not on each keystroke, which for some IMs apparently caused a full
update on each keystroke, not just a check for changes. Patch from
Takuro Ashie, bug #698183 .
2013-06-20 17:09:37 +02:00
Aleksander Morgado
136f6b15be
win32: don't convert '\n' to '\r\n' when copying if it already is '\r\n'
...
https://bugzilla.gnome.org/show_bug.cgi?id=649390
2013-06-18 14:37:03 +02:00
Jani Välimaa
44b287a4ae
Ensure broadway backend links when using as-needed linking
...
Error message at:
http://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20130617185755.wally.valstar.6794/log/gtk+3.0-3.9.4-1.mga4/build.0.20130617185804.log
<ovitters> mclasen_:
http://svnweb.mageia.org/packages/cauldron/gtk%2B3.0/current/SOURCES/gtk%2B-3.9.4-linking.patch?revision=444164&view=markup
<ovitters> mclasen_: gtk doesn't seem to link properly on Mageia
(as-needed thing probably)
<mclasen_> sure, looks fine
<ovitters> can I commit this?
<mclasen_> yes, please commit
2013-06-17 21:55:30 +02:00
Tarnyko
53a9311e2c
broadway: Add win32 support
2013-06-13 19:35:43 +02:00
Tarnyko
e2da2259ad
broadway: Support TCP displays
2013-06-13 19:12:46 +02:00
Tarnyko
d4dacc596f
broadway: Only use gio-unix on G_OS_UNIX
2013-06-13 18:15:10 +02:00
Tarnyko
050702494b
broadway: Remove unused includes
2013-06-13 18:09:32 +02:00
Tarnyko
b20d949470
broadway: Add configure checks for sys/mman.h
2013-06-13 18:01:44 +02:00
Benjamin Otte
7ce198ea6f
x11: Remove motif dnd leftovers
2013-06-13 15:31:35 +02:00
Руслан Ижбулатов
b0016252cf
Pass screen to visual init (no default screen is available yet)
...
https://bugzilla.gnome.org/show_bug.cgi?id=700444
2013-06-11 11:16:04 +02:00
Руслан Ижбулатов
ae35951a73
Fix display/screen/displaymanager init interdependency
...
https://bugzilla.gnome.org/show_bug.cgi?id=700444
2013-06-11 11:16:03 +02:00