Commit Graph

184 Commits

Author SHA1 Message Date
Benjamin Otte
4585af5719 gdk: Remove visual APIs from GdkScreen
gdk_screen_list_visuals(), gdk_screen_get_system_visual() and
gdk_screen_get_rgba_visual() are gone now.
2016-11-04 00:02:37 +01:00
Benjamin Otte
d249e77bcb API: screen: Remove gdk_screen_is_composited()
Switch code to use gdk_display_is_composited() instead.

The new code also doesn't use a vfunc to query the property but rather
requires the backend to call set_composited()/set_rgba() to change the
value.
2016-10-29 04:49:47 +02:00
Benjamin Otte
45c0379f87 API: gdk: Remove visual querying APIs
They are unused, only work on the default display anyway and visuals are
on their way out.
2016-10-28 05:22:50 +02:00
Benjamin Otte
f420dc7456 API: gdk: Remove gdk_window_get_visual()
With it, remove window->visual.
2016-10-28 05:22:49 +02:00
Alexander Larsson
70935f0952 Drop support for offscreen GdkWindows
These complicate a lot of GdkWindow internals to implement features
that not a lot of apps use, and will be better achieved using gsk.
So, we just drop it all.
2016-10-25 09:54:37 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Benjamin Otte
89f2e17f91 API: Remove gdk_window_set_composited()
And the related call gdk_display_supports_composite().
2016-10-16 18:17:21 +02:00
Benjamin Otte
8d54c641f1 screen: Remove unused vfunc
GdkScreenClass.broadcast_client_message was unused, but a bunch of
backends still had functions (not) implementing it.
2016-10-16 18:17:21 +02:00
Benjamin Otte
9be9e00a0e API: screen: Remove gdk_screen_make_display_name()
It's identical to gdk_display_get_name().
2016-10-16 18:17:21 +02:00
Benjamin Otte
6b9e481e38 API: screen: Remove gdk_screen_get_active_window()
... and gdk_screen_get_window_stack().

Those functions were originally added in
5afb4f0f11 but do not seem to be used as
they are not implemented anywhere but in X.

As GDK is not meant to fulfill window management functionality I'm going
to remove these functions without replacements.
2016-10-16 18:17:21 +02:00
Benjamin Otte
26f9b584be API: gdk: Remove gdk_screen_get_number()
It's useless everywhere but in internal X11 code.
2016-10-16 18:17:21 +02:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Andreas Pokorny
fe216b0039 Do not filter out small scroll event fractions
The scroll motion values are subject of batching and scaling. Either
through scaling or by using a touchpad smooth scroll motion changes
below 0.5 are possible.

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

Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-09-26 11:49:56 -04:00
William Hua
7665ee4208 mir: group DND, tooltips, and notifications with menu-type windows 2016-08-12 11:37:35 -04:00
Andreas Pokorny
b2719c0383 Remove outdated comments
https://bugzilla.gnome.org/show_bug.cgi?id=768138
2016-08-11 12:23:38 -04:00
Andreas Pokorny
3334e0a21d Use Menus to implement tooltips
The order in which tooltips are created, drawn, shown and then positioned,
always requires repositioning the surface. The tooltip window type only has
limited capability to do so. An alternative could be to use bufferstreams.

https://bugzilla.gnome.org/show_bug.cgi?id=768138
2016-08-11 12:23:38 -04:00
Andreas Pokorny
056ddf2567 Fix execution of dialog
When a dialog is created, the mir event source is already executed on the
call stack. So without the recurse flag it will not be run in the main loop
used for the dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=768138
2016-08-11 12:23:38 -04:00
Andreas Pokorny
f95d270372 Only apply type hint if it would map to a different mir surface type
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:41:27 -04:00
Andreas Pokorny
da17eae747 Apply geometry hints to mir surface
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
96dcf89155 Apply and forward title changes of gdk windows
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
6dfb554558 Only update surface spec when there is no spec change pending 2016-08-10 13:36:38 -04:00
Andreas Pokorny
5a8af1af75 Rework window construction - only recreate surface when necessary
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
83471052cf Forward repeated key presses as further down keys
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
097ed2b40a Fix warning on newer version so mir 0.22 and newer
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
bc4df6d4b3 Fix gcc warning on potentially uninitialized gdk_event. 2016-08-10 13:36:38 -04:00
Andreas Pokorny
252ccb846f Use the surface output event to keep track of the suggested scale value
The event will be sent when the surface becomes visible on an output. With this change the GdkMirWindowImpl keeps track of the scale value and sends a configure event on change.

Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Matthias Clasen
82fd72a477 Opt in to structured logging
Define G_LOG_USE_STRUCTURED, so that all our g_debug, g_warning,
etc calls directly use structured logging and provide source information.
2016-07-22 23:13:20 -04:00
William Hua
748ebd3d72 mir: implement gdk_window_move_to_rect ()
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
Matthias Clasen
0f476590fb Make gdk_event_get_pointer_emulated public
There is not strong reason to keep the getter private.
At the same time, strip _-prefixes from a few other GdkEvent
APIs. Update all callers.
2016-05-10 15:16:45 -04:00
Frediano Ziglio
cf14fea5a8 Save scancode inside GdkEventPrivate
Windows save in hardware_keycode an information which is not so low
level and some application require the hardware scancode.
As Windows provides this information save it in GdkEventPrivate
and provide a function to get this information.
For no Windows system the function return the hardware_keycode instead.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=765259
2016-04-21 22:35:47 -04:00
Rico Tzschichholz
1e27fe83ea mir: display->list_devices vfunc was dropped
See 4a6f8a065a

https://bugzilla.gnome.org/show_bug.cgi?id=762891
2016-03-02 10:24:44 +01:00
Paolo Borelli
38ad57948c gdk: remove the core_pointer field from GdkDisplay
It is not used anymore, so no need to set it

https://bugzilla.gnome.org/show_bug.cgi?id=762820
2016-02-29 14:15:04 +01:00
William Hua
acbb0c4bdd mir: fix warnings 2016-02-24 13:24:14 -05:00
William Hua
594ba3071b mir: fix GdkSeat-related deprecations 2016-02-24 13:23:18 -05:00
Emmanuele Bassi
90d5c7f9e8 mir: Add C++ guards
Avoid missing symbols when compiling C++ including the GDK Mir backend
header.

https://bugzilla.gnome.org/show_bug.cgi?id=761829
2016-02-11 12:01:39 +00:00
William Hua
2b95e4db55 mir: add default GdkSeat for the default GdkDisplay 2016-01-15 14:10:53 -05:00
William Hua
d2ef875e09 mir: remove deprecated function call 2015-12-04 11:17:43 -05:00
Cemil Azizoglu
9e2b796e77 mir: Print hscroll and vscroll values when debugging.
Signed-off-by: William Hua <william.hua@canonical.com>
2015-11-02 10:46:37 -05:00
William Hua
1760ada1ff mir: emulate pointer for all touch events 2015-10-27 16:37:21 -04:00
William Hua
6f340d4384 mir: warning clean-up 2015-10-27 10:50:18 -04:00
William Hua
c3b0b8a360 mir: allow logging touch events 2015-10-27 10:11:43 -04:00
Robert Ancell
aefa1ba611 gdk: Deprecate gdk_display_get_screen 2015-10-27 14:17:52 +13:00
William Hua
027b02a371 mir: send touch events 2015-10-16 10:51:36 +01:00
William Hua
af5792f141 mir: support more pixel formats 2015-10-14 09:21:41 +01:00
William Hua
bd71b801de mir: don't ensure_surface if window not visible 2015-07-15 07:43:55 -04:00
William Hua
064f28fcbc mir: don't warn if transient_for is NULL 2015-07-15 07:43:55 -04:00
William Hua
b32899b98a mir: add more default settings under mir 2015-07-15 07:43:55 -04:00
William Hua
1e6c7e3af0 mir: fix mir pointer event to gdk translation 2015-07-03 13:48:13 -04:00
William Hua
2d223facdc mir: ensure parent surface before creating child surface 2015-07-03 13:48:13 -04:00
William Hua
da14dbe4e5 mir: fix toggling between maximized and restored 2015-06-23 13:17:28 -04:00
William Hua
e083eb42e9 mir: fix wheel scrolling in both directions 2015-06-23 13:17:28 -04:00
William Hua
8fac1f688e mir: emit GDK_ENTER_NOTIFY on pointer enter 2015-06-23 13:17:28 -04:00
William Hua
2374a1b50b mir: remove non-useful logging 2015-06-23 13:17:28 -04:00
William Hua
19f66c781f mir: don't need dummy egl surface 2015-06-23 13:17:28 -04:00
William Hua
be068607f6 mir: emit configure event on window move/resize
Without this, some windows don't restart the paint clock needed to
actually render the contents.
2015-06-23 13:17:27 -04:00
William Hua
9800d83a72 mir: fix build due to missing api 2015-06-23 13:17:27 -04:00
William Hua
d37f94a524 mir: keep reference on queued events 2015-06-02 15:14:27 -04:00
William Hua
f1c11740c1 mir: gdk_mir_window_impl_set_surface_type 2015-06-02 15:14:27 -04:00
William Hua
e1c958e70d mir: Create the correct surface 2015-06-02 15:14:27 -04:00
William Hua
a57636f057 mir: Remove redundant calls 2015-06-02 15:14:27 -04:00
William Hua
aebac40d38 mir: log input events properly 2015-06-02 15:14:27 -04:00
William Hua
e6b3bae787 mir: Resolve warnings 2015-06-02 15:14:27 -04:00
William Hua
a43efc6655 mir: Update cursor position 2015-06-02 15:14:26 -04:00
William Hua
d43f5258ff mir: Remove child window rendering hack 2015-06-02 15:14:26 -04:00
William Hua
6a51ac59f0 mir: handle generic input events 2015-05-06 10:27:03 -04:00
William Hua
ea190a339a mir: fix build failure due to changed api 2015-04-30 12:41:33 -04:00
Fabiano Fidêncio
fea2e7bf35 gdkkeys: Add support to _get_scroll_lock_state()
GdkKeymap already has support for _get_num_lock_state() and
_get_caps_lock_state(). Adding _get_scroll_lock_state() would be good
for completness and some backends (Windows?) could take advantage of
this.
2015-04-27 20:07:52 -03:00
William Hua
61f3399f98 mir: Fix build failure due to changed API
mir_surface_set_event_handler() now takes three arguments.
2015-04-07 10:38:22 -04:00
Rico Tzschichholz
db8e6aa497 mir: Fix version annotation, the mir-backend is available since 3.16 2015-03-20 20:23:01 +01:00
Emmanuele Bassi
d066e7541e Remove GdkGLProfile
The existence of OpenGL implementations that do not provide the full
core profile compatibility because of reasons beyond the technical, like
llvmpipe not implementing floating point buffers, makes the existence of
GdkGLProfile and documenting the fact that we use core profiles a bit
harder.

Since we do not have any existing profile except the default, we can
remove the GdkGLProfile and its related API from GDK and GTK+, and sweep
the whole thing under the carpet, while we wait for an extension that
lets us ask for the most compatible profile possible.

https://bugzilla.gnome.org/show_bug.cgi?id=744407
2015-02-12 17:51:31 +00:00
Emmanuele Bassi
022724aa69 gl: Drop profile for gdk_window_create_gl_context()
Now that we have a two-stages GL context creation sequence, we can move
the profile to a pre-realize option, like the debug and forward
compatibility bits, or the GL version to use.
2015-02-12 12:34:28 +00:00
Marco Trevisan (Treviño)
c82ad2c129 mir, gl: Ensure we use the 3.2 core profile
Emit an error if the profile is different.
2015-02-12 03:34:05 +01:00
Marco Trevisan (Treviño)
ce31df3238 mir: Switch GDK_GL_PROFILE_DEFAULT to mean 3_2_CORE
Instead of LEGACY.
2015-02-12 03:32:11 +01:00
Marco Trevisan (Treviño)
f9503ac189 mir, GL: Split GL context creation in two phases
Move egl_context initialization in gdk_gl_context_realize

 • gdk_window_create_gl_context() creates a GdkGLContext
 • gdk_gl_context_realize() creates the underlying resources

https://bugzilla.gnome.org/show_bug.cgi?id=741946
2015-02-12 03:03:18 +01:00
William Hua
0a64a4f3c0 mir: release surface before rendering parent
We should remove the mir and cairo surface before rendering the
transient_for, which will regenerate the cairo surface anyways.
Otherwise, we end up releasing both, when we only really want to get rid
of the mir surface.
2015-02-05 17:26:19 +01:00
William Hua
85c5f6058a mir: don't always request mir surfaces
Some child window behaviour is faked by painting in the parent, so we
don't bother creating the Mir surface in that case.
2015-02-05 17:26:19 +01:00
William Hua
bee39d2251 mir: reconstruct surface if window is moved 2015-02-05 17:26:19 +01:00
William Hua
16b250f9bb mir: stop using deprecated surface api 2015-02-05 17:26:19 +01:00
William Hua
5eacc92ba7 mir: fix issues with mouse over parent menu
Mouse over a parent menu[bar] didn't work while the menu was open.
The fix was to correct the behaviour of pointer crossing events so that
the pointer appears to be only inside one window at a time.

See: http://tronche.com/gui/x/xlib/events/window-entry-exit/normal.html
2015-02-05 17:26:19 +01:00
William Hua
6a3904cf0c mir: add back window hierarchy functions 2015-02-05 17:26:19 +01:00
William Hua
c2afa674e2 mir: stop forwarding motion events to subwindows 2015-02-05 17:26:19 +01:00
William Hua
901bc2957d mir: generate leave events for transient children 2015-02-05 17:26:19 +01:00
Marco Trevisan (Treviño)
737e598a17 mir: use monitor plug names more similar to the ones used in Xmir 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
9a84c3e0f5 mir: only paint background if window has one 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
38d46aacae mir: use old scrolling system if we get simple integer values 2015-02-05 17:26:18 +01:00
William Hua
584cfff90a mir: end the current grab on ungrab 2015-02-05 17:26:18 +01:00
William Hua
e843d94405 mir: only render non-top-level transients. 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
9abf990656 mir: handle new MirCloseSurfaceEvent 2015-02-05 17:26:18 +01:00
William Hua
5ac5f6f81a mir: reset cursor_inside on hide/withdraw
Without this, we generate incorrect crossing events for transient
windows.
2015-02-05 17:26:18 +01:00
William Hua
8e0abb4bac mir: disable some debug output 2015-02-05 17:26:18 +01:00
William Hua
4f19be1c82 mir: skip windows that aren't visible 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
05de5b02cb mir: fix IsModifierKey definition 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
345140008e mir: check the log events env variable just once 2015-02-05 17:26:18 +01:00
Marco Trevisan (Treviño)
7e5b216511 mir: set event source device as well 2015-02-05 17:26:18 +01:00
William Hua
7c2e3a812a mir: fix time conversion macro 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
54f9263f19 mir: implement stub _gdk_mir_keymap_key_is_modifier
Using IsModifierKey for now
2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
a8b1e81816 mir: check (using simple keycode checking) if we're handling a modifier key 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
9e2eb5d2f6 mir: compute the modifiers using the saved button_state on key events 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
7d4066de41 mir: add a NANO_TO_MILLI conversion macro 2015-02-05 17:26:17 +01:00
Marco Trevisan (Treviño)
6b6af59b9b mir: properly converts mir nanoseconds timestamps to milliseconds 2015-02-05 17:26:17 +01:00