Commit Graph

5209 Commits

Author SHA1 Message Date
Benjamin Otte
a489f69e00 gdk: Remove unused function 2013-04-15 15:43:27 +02:00
Benjamin Otte
7ef508ff4a displaymanager: Handle list of displays in base class
This moves the add/remove_display() functions from the subclasses to
GdkDisplay and GdkDisplayManager. It also gets rid of the list_displays
vfunc.
2013-04-15 15:43:26 +02:00
Benjamin Otte
f7c0b025b9 displaymanager: Move set_default_display vfunc
... to GdkDisplayClass.make_default. It's only implemented by X11
anyway.
2013-04-15 15:43:26 +02:00
Benjamin Otte
839f402191 displaymanager: Handle the default display
... instead of having every backend do it on their own.
2013-04-15 15:43:26 +02:00
Matthias Clasen
c60bfa40ad Precache more atoms
Add a few more entries to the list of precached atoms.
2013-04-13 19:48:38 -04:00
Matthias Clasen
bb4fca2486 wayland: Don't get the shell surface twice
Noticed by Pu Xingyu,
https://bugzilla.gnome.org/show_bug.cgi?id=697947
2013-04-13 17:20:05 -04:00
Rob Bradford
bff5b2ae3e wayland: Don't "probe" for a Wayland compositor if started from compositor
In the case that the client is started directly by the compositor the
WAYLAND_SOCKET environment variable is set containing the fd to use that was
created by a socketpair.

This environment variable is consumed by a call to wl_display_connect so a
second call will not take advantage of it.

https://bugzilla.gnome.org/show_bug.cgi?id=697673
2013-04-12 18:43:36 +01:00
David King
b0121ed0a1 xi2: Improve pointer emulation debug reporting
Reporting "true" or "false" is nicer than the value of the flag.

https://bugzilla.gnome.org/show_bug.cgi?id=697795
2013-04-11 15:56:13 +01:00
Alexander Larsson
645f6435e5 gdkwindow: Handle updates created by outstanding moves in same update
If gdk_window_flush_outstanding_moves() creates new update area
we handle this directly in the same draw to avoid flashing.

This mainly affects win32 as X11 does its exposes from moves async.
However, its important for win32 since ScrollDC seems to sometimes
invalidate (and not copy) unexected regions.

http://bugzilla.gnome.org/show_bug.cgi?674051
2013-04-11 12:15:30 +02:00
Alexander Larsson
1884271f03 win32: Report ScrollDC update region directly
Rather than set the window update region and repaint this region
when we get a WM_PAINT we just directly add it to the update
region. No need to roundtrip via win32.

This lets us also make sure we do this drawing in the same update
cycle. This seems especially important on Win7, because ScrollDC
seems to act kind of weird there, not using bitblt in areas where
it seemingly could, which makes scrolling look really flashy.

http://bugzilla.gnome.org/show_bug-cgi?id=674051
2013-04-11 12:12:35 +02:00
Alexander Larsson
9011a79ed2 Make gdk_flush_outstanding_moves "reentrant"
If do_move_region_bits_on_impl causes updates they will propely
be moved by the outstanding moves we have not yet flushed.
2013-04-11 11:35:17 +02:00
Alexander Larsson
781ad5a1bc win32: Make build with latest gdkdisplay changes 2013-04-11 11:25:25 +02:00
Carlos Garnacho
cc7b3985b3 xi2: Reset scroll valuators on synthesized crossing events
On crossing events resulting from moving windows (eg. workspace switch),
deviceid equals sourceid, so make those reset scroll valuators on all
slave devices to avoid misleading jumps in scroll events

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690275
2013-04-10 20:18:09 +02:00
Chris Cummins
6deff39f74 wayland: Use more explicit out parameter names
Prevent confusion between positional values and hotspot values.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-04-09 12:52:56 +01:00
Rob Bradford
b37d83e988 wayland: don't leave root window values uninitialised
Under Wayland we don't know the absolute position of the device but there are
some API calls that expect to get an root window position. Previously we were
not assigning any value to these out parameters potentially leaving the values
undefined.

This change returns the current surface relative position of the device.
2013-04-09 12:52:16 +01:00
Matthias Clasen
96982347b3 wayland: Clean up gdkwayland.h
Make this an include-only header
2013-04-08 22:32:50 -04:00
Matthias Clasen
6629e839d0 wayland: Implement gdk_keymap_get_modifier_state 2013-04-06 21:16:38 -04:00
Matthias Clasen
acf56b6cb3 wayland: Fix gdk_keymap_translate_keyboard_state
I was confusing indices and masks here, which made the modifier
translation go wrong. With this commit, accelerators work.
2013-04-06 17:03:27 -04:00
Matthias Clasen
1b2711cde2 wayland: Implement gdk_keymap_translate_keyboard_state 2013-04-06 10:48:57 -04:00
Matthias Clasen
eb9ab7aad4 wayland: Fix up key event translation
The is_modifier field is supposed to be set if the key
would act as a modifier, not if any modifiers are currently
active. To fix this, introduce a private
_gdk_wayland_keymap_key_is_modifier function.

At the same time, make the hardware_keycode field in key
events actually contain the hardware keycode, not a copy
of the keyval.
2013-04-06 10:48:57 -04:00
Matthias Clasen
c659f892ff trivial whitespace fix 2013-04-06 10:48:56 -04:00
Matthias Clasen
720ca63c5d wayland: Return NULL as the keyval name for 0
This is what the X11 backend does, and it makes the "NoSymbol"
disappear from menuitems that don't have an accelerator.
2013-04-06 10:48:56 -04:00
Benjamin Otte
ae2208cd5d gdk: Deprecate gdk_display_get_n_screens() 2013-04-06 10:47:55 +02:00
Benjamin Otte
f8b017faa8 x11: Simplify code for single-screen case 2013-04-06 10:47:55 +02:00
Tristan Van Berkom
6a90c48ea6 GdkOffscreenWindow: Implement gdk_window_get_frame_extents()
This avoids crashes in gtk_window_get_position() whenever the GdkWindow
is offscreen.
2013-04-06 17:16:09 +09:00
Alexander Larsson
9a79c3d643 broadway: Unsure we clear the grab on window hide 2013-04-05 17:07:04 +02:00
Alexander Larsson
a6a768437d broadway: Fix warning
Don't pass NULL source_device in grab/ungrab events
2013-04-05 17:07:03 +02:00
Matthias Clasen
cdcc804730 wayland: Implement more keymap functions
This commit implements gdk_keymap_get_entries_for_keyval
and gdk_keymap_lookup_key.
2013-04-05 07:23:00 -04:00
Matthias Clasen
be1e57db1f wayland: Implement gdk_keymap_get_entries_for_keycode 2013-04-05 07:23:00 -04:00
Matthias Clasen
086789d015 wayland: Always initialize directions
I forgot to initialize directionm in gdk_wayland_keymap_new,
leading to crash.
2013-04-04 21:14:53 -04:00
Matthias Clasen
246f32a58d wayland: Emit ::direction-changed when appropriate
We always emit direction-changed when we get a new keymap, but
for state changes, we compare old and new direction and only
emit the signal when the direction actually changes.
2013-04-03 23:52:52 -04:00
Matthias Clasen
2f8f1ef485 wayland: Implement keymap direction
This is very similar to the X11 implementation.
2013-04-03 23:45:54 -04:00
Pavel Vasin
5d9c07a061 wayland: display: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=696767
2013-04-03 19:20:57 -04:00
Alexander Larsson
8084e6e468 broadway: Ensure we allocate shm surface space early
This is nicer then getting random sigbus later
2013-04-03 15:58:42 +02:00
Alexander Larsson
c340dfeaf8 Broadway: Fix shm names
We were sometimes getting zero chars in the name, making them
shorter, due to an off-by-zero in the size.
2013-04-03 15:58:41 +02:00
Alexander Larsson
b7a1561fef broadway: destroy old surface before creating new one
We were not using the old one anyway, and this may in some cases
use less memory (although in most cases the server has a ref to the
surface anyway).
2013-04-03 15:58:40 +02:00
Rob Bradford
000ed99f3d gdkdisplay: Warn if asked for a non-zero screen not a zero screen
Following on from a6b29d73 this commit correctly warn if you try and use
deprecated multiple screen behaviour.
2013-04-02 12:04:22 +01:00
Benjamin Otte
a55f1f4e95 broadway: Mark deprecated function call
... to avoid gcc warning us. Ideally, we'd not call a deprecated
function here, but I'm lazy.
2013-04-02 11:45:44 +02:00
Benjamin Otte
dc132a9895 broadway: Don't use deprecated API 2013-04-02 11:45:44 +02:00
Benjamin Otte
a6b29d73d7 gdkdisplay: Remove get_screen() and get_n_screens() vfuncs 2013-04-02 11:45:44 +02:00
Alexander Larsson
40c3062d33 broadway: Use wss: on https: uris 2013-04-01 17:44:33 +02:00
Benjamin Otte
f73bf26df0 Deprecate gdk_get_display() 2013-04-01 14:20:47 +02:00
Benjamin Otte
cb2c47597e gdk: Shuffle code around
Make implementation, header and documentation be at the correct place.
2013-04-01 14:20:46 +02:00
Benjamin Otte
47a8c2f733 x11: Make display:screen relation 1:1
Only ever open the default screen.

If apps need support for multiple screens, they need to
gdk_display_open() them manually.
2013-04-01 14:20:46 +02:00
Benjamin Otte
e76cb9daca wayland: Remove unused variable 2013-04-01 14:20:46 +02:00
Matthias Clasen
28fab2eea2 Remove an unused filed in GdkWindowImplWayland
The unused toplevel_window_type field was copied over from
the X backend.
2013-03-31 22:46:31 -04:00
Matthias Clasen
cb4cf67a95 Remove an unused field in GdkWindowX11
The toplevel_window_type field was only ever set to -1, and
never used. The actual, used toplevel_window_type field lives
in GdkWindow.
2013-03-31 22:44:59 -04:00
Kristian Høgsberg
4252ac6d6c wayland: Set a wayland-client log handler to print errors we get 2013-03-30 14:20:00 -04:00
Kristian Høgsberg
8886c63a4e wayland: Don't error out on G_IO_HUP until we've read G_IO_IN data
We can get G_IO_HUP and G_IO_IN at the same time, if the compositor writes
data to us and then closes our connection.  Make sure that we dispatch events
always if we have G_IO_IN and then error out if we get G_IO_HUP after that.
2013-03-30 14:20:00 -04:00
Alexander Larsson
e9b8b5c1f0 broadway: Reuse surfaces passed to server
This way we don't have to reopen all the time for pure updates,
and we can immediately unlink the shm file to avoid "leaking" them
on improper shutdown.
2013-03-29 14:09:47 +01:00