1
0
Fork 0
Commit graph

6142 commits

Author SHA1 Message Date
Emmanuele Bassi
c55922dac1 docs: Fix the examples for ClutterText.set_font_name()
We shouldn't be using "pt": PangoFontDescription.from_string() assumes
points, and only accepts "px" for absolute font sizes.

https://bugzilla.gnome.org/show_bug.cgi?id=736826
2014-09-22 11:30:52 +01:00
Emmanuele Bassi
f409671d91 docs: Fix annotation for has_mapped_clones() method
The Returns: stanza is missing.
2014-09-17 14:59:22 +01:00
Emmanuele Bassi
28a5104e11 Remove gtk-doc tags from clutter_test_* API
The API is public because we use it in the test suite, but it's not
documented.
2014-09-17 14:58:17 +01:00
Emmanuele Bassi
14da1c5027 actor: Unallocated children do not contribute to the paint volume
Just like unmapped children.

Apparently, layers above Clutter allow mapped children without an
allocation, instead of unmapping them. This means we need to ignore
them when computing the paint volume.

Patch originally by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=736682
2014-09-15 16:53:31 +01:00
Emmanuele Bassi
acd8f86570 actor: Default paint volume does not work without allocation
We already check for needs_allocation before getting the default paint
volume, but explicit is better than implicit.
2014-09-15 16:43:30 +01:00
Jonas Ådahl
a182d4befa ClutterInputDevice: Store the cursor coordinate state as floating point
To support sub-pixel motion events coming from relative events, the
fraction part needs to be stored in the input device state as well. To
do this, simply change the current type from gint to gfloat.

https://bugzilla.gnome.org/show_bug.cgi?id=736413
2014-09-14 16:58:27 +02:00
Alejandro Piñeiro
281a57a6a3 a11y: provide a way to ensure clutter accessibility
If gtk_init is called after clutter_init, it can override clutter
AtkUtil implementation. In that situation, we can't say that
the accessibility is enabled, as the root object would be wrong.

In order to provide a way to prevent this:

* clutter_get_accessibility_enabled returns true of false
  depending on the current AtkUtil implemented
* cally_accessibility_init always override AtkUtil implementation.
2014-09-03 16:03:16 +02:00
Bastien Nocera
908aedbacc gdk: Add window-scaling-factor support
So that we follow GDK's idea of a scaling factor for Clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=734480
2014-09-03 14:21:08 +01:00
Emmanuele Bassi
b3b2af7677 Re-introduce removed GestureAction method
The get_threshold_tigger_egde() method was renamed to fix the typo, but
it obviously broke the ABI. To be fair, nobody in the whole of Debian
was using the symbol, apparently, so it's not like we broke existing
code. Still, it's not nice to break ABI without bumping soname, so let's
put the old symbol back in — obviously, deprecated — as a wrapper to the
newly added one.
2014-09-03 14:16:31 +01:00
Carlos Garnacho
591d31c970 xi2: XSync before getting the client pointer on construction
If the device manager is created and queried for the client pointer at
a very early stage in application lifetime, the device_id returned would
be 0 as the server hasn't apparently decided yet about the client pointer.

For these situations, doing XSync prior to fetching the client pointer
gets the server to device about the client pointer before we query it.

https://bugzilla.gnome.org/show_bug.cgi?id=735388
2014-08-25 16:51:31 +02:00
Adel Gadllah
cfcba18684 clutter-settings: Mark window-scaling-factor as fixed when set by the app
When an application sets the scaling factor manually we should mark it as fixed
and not override it when the xsettings change. This matches GDKs behaviour.

In order for this to work we cannot use the same path when setting the value
internally so introduce a _clutter_settings_set_property_internal and use it
for that.

https://bugzilla.gnome.org/show_bug.cgi?id=735244
2014-08-23 14:02:56 +02:00
Emmanuele Bassi
bd3e4f1709 evdev: Fix compiler warning 2014-08-21 15:26:14 +01:00
Sunjin Yang
158af1ff59 actor: Plug a leak in the implicit transition removal
We need to release the temporary reference we acquired in order for the
signal emission to work.

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

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2014-08-21 15:19:18 +01:00
Lionel Landwerlin
ad18f2a996 backend: gdk: add support for foreign windows on wayland
https://bugzilla.gnome.org/show_bug.cgi?id=734935
2014-08-17 16:55:10 +01:00
Lionel Landwerlin
ccd2054fda backend: gdk: add translation code for touch events
https://bugzilla.gnome.org/show_bug.cgi?id=734934
2014-08-17 16:55:10 +01:00
Emmanuele Bassi
be8602fbb4 Revert "backend: try gdk backend before x11/wayland/egl"
This reverts commit 398a7ac713.

We cannot really use the GDK backend without massive regressions inside
the input layer, like touch events and gestures. The GDK backend is not
entirely up to scratch, and it's late in the cycle.

Let's land this early in 3.15, and get it up to par with X11.
2014-08-15 12:11:20 +01:00
Emmanuele Bassi
f12c174d72 Remove unused internal 'in-resize' flag
A remnant of days gone by.
2014-08-15 12:07:48 +01:00
Lionel Landwerlin
398a7ac713 backend: try gdk backend before x11/wayland/egl
Quite a few people at Guadec complained of pinpoint being broken in
speaker+fullscreen mode, with slides being half displayed. It turns
out that the X11 backend of clutter was being used and this backend
assumes the size of the current monitor is the size of the X screen
(that's not the case with multiple monitors).

To work around the shortcomings of the X11 backend we should probably
position the GDK one before. GDK implements most of the logic the
ClutterStage needs and is probably more tested.

https://bugzilla.gnome.org/show_bug.cgi?id=734587
2014-08-10 20:26:02 +01:00
Rui Matos
f95493e7bf evdev: Add API to set the xkb layout index
https://bugzilla.gnome.org/show_bug.cgi?id=733202
2014-08-07 11:43:00 +01:00
Tom Beckmann
72aaeed3f5 canvas: assign white to paint color for texture node
To get correct premultiplied opacity on a canvas content, white needs
to be assigned to the color that is passed to the texture node. The
content will be very dark for lower opacity values otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=733385
2014-07-25 09:31:57 +01:00
Carlos Garnacho
0c0c069b3f input-device: Ensure crossing events are paired for touch sequences
When the sequence is lifted the actor wouldn't be unset, so the corresponding
CLUTTER_LEAVE event would never be sent for the touch sequence.

https://bugzilla.gnome.org/show_bug.cgi?id=733560
2014-07-23 14:32:24 +02:00
Carlos Garnacho
9e8c92d66a evdev: Update xkb state after input is resumed
xkb_state creation has been refactored out of clutter_evdev_set_keyboard_map(),
and used too in clutter_evdev_reclaim_devices(), so the xkb_state is fresh
clean after input is paused/resumed (and keyboard state possibly changed in
between)

https://bugzilla.gnome.org/show_bug.cgi?id=733562
2014-07-23 14:27:38 +02:00
Carlos Garnacho
958ffd4d40 event: define a boxed type for ClutterEventSequence
This allows for some minimal interaction from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=733561
2014-07-23 14:23:20 +02:00
Giovanni Campagna
c167d3a4d3 ClutterAnimation: fix memory leak
We need to unref the timeline

https://bugzilla.gnome.org/show_bug.cgi?id=733300
2014-07-17 16:41:08 +02:00
Carlos Garnacho
f6fd02970c evdev: Set button modifier state to input devices.
Input devices must get the proper button state, in addition to keyboard
modifiers.

https://bugzilla.gnome.org/show_bug.cgi?id=733062
2014-07-11 15:39:05 +02:00
Carlos Garnacho
8d669ab8ce gesture-action: Prepare for clutter_gesture_action_cancel() within ::gesture-end
There may be odd situations where full gesture cancellation may be wanted at once
when the first touch is lifted and ::gesture-end is emitted on a gesture action.
Although calling clutter_gesture_action_cancel() within the ::gesture-end handler
causes 2 critical warnings that are otherwise harmless.

https://bugzilla.gnome.org/show_bug.cgi?id=732907
2014-07-08 18:48:20 +02:00
Owen W. Taylor
ec911dc8b9 ClutterStage: Replace clutter_stage_set_paint_callback() with ::after-paint signal
clutter_stage_set_paint_callback() has the disadvantage that it only
works for a single caller, and subsequent callers will overwrite and
break previous callers. Replace it with an ::after-paint signal that is
emitted at the same point - after all painting for the stage is
completed but before the drawing is presented to the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=732342
2014-06-27 14:39:02 -04:00
Emmanuele Bassi
036c2b3764 gesture-action: Use event type getter
Don't use direct struct access.
2014-06-25 16:58:18 +01:00
Carlos Garnacho
02590f08ac gesture-action: Ignore any other event than press/update/release ones
CLUTTER_ENTER/LEAVE might be processed too, leading to accounting of the
NULL sequence (ie. pointer) in the gesture, and fooling the gesture with
a static extra point that wouldn't go away.

https://bugzilla.gnome.org/show_bug.cgi?id=732235
2014-06-25 16:55:41 +01:00
Carlos Garnacho
4c4e72a9dc x11: Set the input device stage on XI_TouchBegin, if not already set
Until now, touch events sort of rely on XI_Enter/XI_Leave events accompanying
the pointer emulating touch in order to have a stage set on the device, These
events won't happen though if it's not a pointer emulating touch which happens
on the stage, causing touch events to be ignored.

Fix this by ensuring that the input device has a stage on XI_TouchBegin itself,
but only if it's not already set, so we don't possibly steal touch events to
an already interacting stage.

https://bugzilla.gnome.org/show_bug.cgi?id=732234
2014-06-25 16:55:16 +01:00
Carlos Garnacho
42f6828c9c input-device: Do not unset the device stage after the last touch is lifted
On X11 the pointer will follow a "pointer emulating" touch sequence, so the
pointer will be effectively left inside the stage after that touch is lifted,
even though the master device stage is unset. This makes pointer events get
ignored until the pointer leaves and enters again the stage.

https://bugzilla.gnome.org/show_bug.cgi?id=732234
2014-06-25 16:55:16 +01:00
Emmanuele Bassi
8d89294ef6 drop-action: Use the right state for events
The 'state' field should be used for pointer events without button
information. Pointer events that have button information should use
the 'button' field.

https://bugzilla.gnome.org/show_bug.cgi?id=732143
2014-06-25 15:16:30 +01:00
Emmanuele Bassi
ac26dbbbe9 evdev: Update after libinput API changes 2014-06-25 12:21:39 +01:00
Jasper St. Pierre
4cdcbcb2b1 evdev: Add clutter_evdev_warp_pointer
https://bugzilla.gnome.org/show_bug.cgi?id=731536
2014-06-11 17:21:15 -04:00
Jonas Ådahl
31749cfa47 evdev: Follow libinput enum rename
s/libinput_pointer_button_state/libinput_button_state/
s/LIBINPUT_POINTER_BUTTON_STATE_/LIBINPUT_BUTTON_STATE_/

https://bugzilla.gnome.org/show_bug.cgi?id=731254
2014-06-10 11:17:25 +01:00
Jonas Ådahl
61929e26e1 evdev: Used floating point instead of fixed point numbers
Following the API change in libinput, change the uses of fixed point
numbers to floating point numbers.

https://bugzilla.gnome.org/show_bug.cgi?id=731178
2014-06-10 10:39:42 +01:00
Gustavo Noronha Silva
fcdd222c61 device-manager-xi2: use allocation for clamping
The coordinates translated by the XI2 device manager were being clamped using
the X window size kept by StageX11. However, when the stage is fullscreen,
that size is not updated to the screen size, but kept the same in order to
allow going back to it when the stage goes out of fullscreen.

https://bugzilla.gnome.org/show_bug.cgi?id=731268
2014-06-05 15:03:10 -03:00
Jonas Ådahl
7ed92c845f Fix scaling of pointer axis vectors
The vector of libinput and Wayland pointer axis events are in pointer
motion coordinate space. To convert to clutter's internal representation
the vectors need to be scaled to Xi2 scroll steps.

https://bugzilla.gnome.org/show_bug.cgi?id=723560
2014-05-28 10:20:13 +01:00
Jonas Ådahl
3da27a4f08 wayland: Fix coding style issues
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=723560
2014-05-28 10:20:13 +01:00
Carlos Garnacho
ed538a6d2c stage: Only compress consecutive touch events from the same sequence
And get CLUTTER_EVENT_LEAVE out of the touch event compression logic, as
touches are always implicitly grabbed. If no sequence check is done, only
the last touch update would be emitted, even if multiple sequences got
updated.

https://bugzilla.gnome.org/show_bug.cgi?id=730577
2014-05-22 13:44:53 +02:00
Carlos Garnacho
fd8705b9c6 gesture-action: Fix typo in clutter_gesture_action_get_threshold_trigger_egde()
Let's cross fingers and hope nobody notices. If this went unnoticed so far, likely
means this function has never been used. If any complain is raised about this, a
stub function should be added (and marked deprecated).
2014-05-21 15:15:01 +02:00
Carlos Garnacho
9510d6ac95 evdev: Add clutter_evdev_event_sequence_get_slot()
This function helps know the libinput slot used by a sequence.

https://bugzilla.gnome.org/show_bug.cgi?id=728968
2014-05-21 14:09:33 +02:00
Carlos Garnacho
50b3d7cd9b evdev: Manage LIBINPUT_EVENT_TOUCH_* events
Those are translated into CLUTTER_TOUCH_* ClutterEvents. As the
"NULL" ClutterEventSequence is special cased, the slot=0 value is
avoided.

Frame events are ignored, as there is no Clutter equivalence, and
Cancel events are sent to all current individual touches.

https://bugzilla.gnome.org/show_bug.cgi?id=728968
2014-05-21 14:09:33 +02:00
Carlos Garnacho
76d48f79d6 evdev: Set core device on translated events
And ensure the core pointer shares the same stage than the slave
device when those events are set. This fixes problems on the evdev
backend where the last touch unsets the stage on the device, but
nothing sets it back afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=728968
2014-05-21 14:09:33 +02:00
Carlos Garnacho
8857b19d49 evdev: Add function to get the libinput_device from a ClutterInputDevice
This may be useful for deeper libinput integration that's not in the scope
of Clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=728967
2014-05-21 14:09:22 +02:00
Carlos Garnacho
91ee1ceca4 evdev: Add evdev specific event filter function
This function can be used to intercept or translate events
that are unmanaged by clutter itself.

https://bugzilla.gnome.org/show_bug.cgi?id=728967
2014-05-21 14:09:22 +02:00
Jasper St. Pierre
b66fec0450 egl: Add a way to pause the ClutterMasterClock
When VT switched away, we need to pause the ClutterMasterClock,
stop processing events, and stop trying to flip.

https://bugzilla.gnome.org/show_bug.cgi?id=730215
2014-05-19 15:48:39 -04:00
Jasper St. Pierre
32af6a3ef4 evdev: Fix a compile warning
device_type_str is only used inside a CLUTTER_NOTE, which evaluate
to nothing when CLUTTER_ENABLE_DEBUG is off.
2014-05-19 15:47:57 -04:00
Emmanuele Bassi
d708c30765 Provide 1.20 version macros 2014-05-19 17:55:52 +01:00
Gustavo Noronha Silva
bf5fe70e23 clutter-canvas: cache the texture to avoid uploads
When an actor carrying canvas content is repainted, it will currently reupload
the data from the buffer to a texture. While this is not a performance problem
on a desktop, some mobile environments take a big performance hit. This
change tracks data changes and only recreates the texture if necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=729144
2014-05-01 11:48:51 -03:00
Emmanuele Bassi
0255b5a133 docs: Add an explicit example of image loading
Using GdkPixbuf, which is what we expect people to use anyway.
2014-04-26 20:50:43 +01:00
Emmanuele Bassi
10ff9a4679 docs: Fix the ClutterImage example URL 2014-04-26 20:50:29 +01:00
Gustavo Noronha Silva
d7b183a4e3 clutter-main: start mainloop timer on clutter_init()
By creating and starting the timer on clutter_main() an assumption is made
that that is how the main loop will be run for all clutter applications.
With more and more applications moving to GApplication, this assumption no
longer holds true.

Moving to clutter_init() means we are starting the timer earlier than we
should, and by not stopping it when the main loop quits we are taking a
measure that is later than we should. I believe it is safe to consider
those are close enough to the actual beginning and quitting of the main
loop in practice.

https://bugzilla.gnome.org/show_bug.cgi?id=728521
2014-04-18 19:05:37 -03:00
Emmanuele Bassi
ef2a94de93 master-clock: Clean up the over-budget diagnostic
Use the difference between the elapsed time and the available budget, so
that the message can be read more easily.
2014-04-14 22:24:47 +01:00
Adel Gadllah
3517c11c9b stage-cogl: Don't mess with the damage_history list when buffer_age is not available 2014-04-10 21:30:15 +02:00
Emmanuele Bassi
f9d99d1c4e test-utils: Skip tests if no DISPLAY is set
Instead of just bailing out when initializing the test suite, we can do
a much better job and skip all the tests. This means that the TAP driver
will work correctly instead of dying a horrible death, and we get a nice
report with a proper cause of the test skipping.
2014-04-02 19:25:55 +01:00
Emmanuele Bassi
f065a34e46 Remove clutter.symbols
The Visual Studio build files have been updated to not use it, so we can
remove it from the repository.
2014-04-02 18:48:59 +01:00
Emilio Pozuelo Monfort
363c0d2f7a wayland: Add missing CLUTTER_AVAILABLE annotations
Signed-off-by: Emilio Pozuelo Monfort <pochu27@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=727020
2014-03-25 14:05:46 +01:00
David Warman
5d53620bb9 stage: re-implement minimal paint() method to respect Z order
Without a paint() implementation in clutter-stage, the function
from clutter-group is used.  That class has its own child list,
but attempts to use sort_depth_order, which is empty in this case.

This provides a partial fix by replacing a minimal paint(), see:

https://bugzilla.gnome.org/show_bug.cgi?id=711645
2014-03-20 17:26:37 +00:00
Chun-wei Fan
2b3fac8b3d clutter-version.h.in: Refine how CLUTTER_VAR is Defined
Define CLUTTER_VAR like how it is done on GLib, so that the version
constants can be exported and imported appropriately on different
compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=726762
2014-03-21 00:33:10 +08:00
Chun-wei Fan
4c204a4f3e clutter-event-win32.c: Avoid a Crash
Commit e70a0109 simplified the dispatching of events by passing the event's
owernership to ClutterStage, but it may be so that any.stage is NULL at
some point on Windows, which will either cause _clutter_stage_queue_event()
to crash or issue a critical warning.  Avoid this problem by checking
whether event->any.stage is not NULL before trying to call
_clutter_stage_queue_event().

https://bugzilla.gnome.org/show_bug.cgi?id=726765
2014-03-20 22:37:17 +08:00
Chun-wei Fan
891d3fce00 Fix on Last Commit of config.h.win32.in
Missed a /* before an #undef line, causing build warnings, oops, sorry.
2014-03-20 09:30:17 +08:00
Chun-wei Fan
44d688cdfb Update config.h.win32.in Further
...so that its entries will reflect the entries that are checked by the
autotools builds on config.h.in.  Also take into consideration for MinGW
builds and for newer Visual Studio versions, such as the availability for
inttypes.h.  Update the layout of the file cosmetic-wise as well.
2014-03-20 09:18:57 +08:00
Chun-wei Fan
783bc64a02 Visual Studio Builds: Don't Generate a .def File
Clutter, like GTK+ and GLib, has recently switched to a visibility-based
method of exporting symbols, so update the Visual Studio build files to
do likewise, by using __declspec (dllexport). This eliminats the need to
use a .def file to export the symbols.  The pre-configured
config.h.win32.in is also updated accordingly for this purpose.  The
clutter.symbols file can be dropped if it is not being used otherwise.
2014-03-20 08:57:06 +08:00
Emmanuele Bassi
4f5dd5ad43 docs: Remove last stray DocBook tags 2014-03-18 14:15:01 +00:00
Emmanuele Bassi
ddc1955f6b docs: Port backend-specific sections to markdown 2014-03-17 23:10:07 +00:00
Emmanuele Bassi
46051bfb20 docs: Port deprecated sections to markdown syntax
And drop docbook tags along the way.
2014-03-17 23:09:27 +00:00
Emmanuele Bassi
12370bd4f8 docs: Move to markdown
We're removing docbook tags in favour of the markdown syntax.
2014-03-17 23:07:58 +00:00
Emmanuele Bassi
115104db8c cally: Remove docbook tags 2014-03-17 23:05:09 +00:00
Emmanuele Bassi
8fc47244b0 build: Remove abicheck.sh
We now control the visibility of symbols directly from the header files,
so we always have the correct ABI.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
386be83f24 New visibility handling in Clutter
Instead of listing every public symbol inside an ancillary file, we can
use compiler annotations. This scheme is also used by GLib and GTK+.

The symbols file is left in tree until the Visual Studio rules are
fixed, but it's not used any more during distcheck.

I double-checked that the exposed ABI is the same before and after this
change, except for symbols that were never meant to be public in the
first place, and that escaped our attention when we generated the first
version of the symbols file.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
5c4c2aa52f symbols: Fix the expected ABI
Some symbols that were never meant to be exported ended up in the
symbols file.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
3b21999494 Use _CLUTTER_EXTERN to define CLUTTER_VAR
The macro is defined outside of the header, and does all the heavy
lifting of getting the proper attributes.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
c44f73a7f1 Include "config.h"
Otherwise the symbol annotation won't be expanded correctly.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
53a86e91d9 Annotate symbols in backend-specific headers
Like we did for the rest of the API.
2014-03-17 19:26:49 +00:00
Emmanuele Bassi
66826bc6ba Annotate symbol visibility in Cally
Like we did for the main library.
2014-03-17 19:26:27 +00:00
Emmanuele Bassi
c69bb976b3 Annotate all public symbols
We are going to switch to compiler annotations to determine the
visibility of the symbols.
2014-03-17 18:53:27 +00:00
Rui Matos
e70a0109f2 Avoid needless event copies when queueing from a backend to a stage
All backends follow the same pattern of queueing events first in
ClutterMainContext, then copying them to a ClutterStage queue and
immediately free them. Instead, we can just pass ownership of events
directly to ClutterStage thus avoiding the allocation and copy in
between.

https://bugzilla.gnome.org/show_bug.cgi?id=711857
2014-03-15 19:44:57 +00:00
Emmanuele Bassi
572504db4d Edit an incorrect comment
The location of the cool-off handling of clipped redraws has been moved
to clutter-stage-x11.c a long time ago (commit 1b1e77b4).
2014-03-15 19:31:54 +00:00
Jasper St. Pierre
79ece182dc egl: Only expose clutter_egl_set_kms_fd if we have KMS support
And only call the proper Cogl functions in that case, too. This
fixes the build on platforms without KMS, like the BSDs.

https://bugzilla.gnome.org/show_bug.cgi?id=726198
2014-03-15 19:09:55 +00:00
Jonas Ådahl
a4440b718d wayland: Keep track of button modifier state
Keep track of the button modifier mask state in
ClutterInputDeviceWayland and push its state to new button events going
out.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=708781
2014-03-14 18:24:03 -04:00
Jasper St. Pierre
a96daf82c2 egl: Add a way to set the KMS FD
This is needed for the logind integration work, where logind will
send us an already-opened FD to KMS.

https://bugzilla.gnome.org/show_bug.cgi?id=726198
2014-03-14 14:12:26 -04:00
Adel Gadllah
06387c3fd7 stage-cogl: Fix feature check in clutter_stage_cogl_redraw
We do not strictly require the 'swap-region' Cogl feature in order to use
clipped redraws: they work equally well with just the 'buffer-age' Cogl
feature.

https://bugzilla.gnome.org/show_bug.cgi?id=726313
2014-03-14 17:56:40 +01:00
Adel Gadllah
f649d732f9 clutter-stage-wayland: Enable clipped redraws
_clutter_stage_window_can_clip_redraws is used to check for clipped redraws
support but can_clip_redraws is not implemented by clutter-stage-wayland so
it always returns FALSE causing full screen redraws.

Fix that by implementing can_clip_redraws in clutter-stage-wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=726315
2014-03-14 17:56:13 +01:00
Adel Gadllah
e4497baaf0 eglnative: Add clutter-stage-window implementation
Add a ClutterStageEglNative implemennation that implements
can_clip_redraws so that clipped redraws can work
on eglnative.

https://bugzilla.gnome.org/show_bug.cgi?id=726341
2014-03-14 17:55:19 +01:00
Jasper St. Pierre
dcaf5686a2 evdev: Always create the main seat
There could be times when we may not necessarily see a device appear
at initialization time, like when we're VT switched away when we
initialize, and thus we can't ever rely on a main seat appearing.

Always create a main seat with logical pointer/keyboard devices, and
tie the first physical seat that comes in to the main seat.

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:28 -04:00
Jasper St. Pierre
defe55ff09 evdev: Extract code for setting the libinput seat out
We're going to create the main seat at an earlier time, when
we don't have the physical libinput_seat yet, so we need to
do the association later.

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:28 -04:00
Jasper St. Pierre
5facd710c8 evdev: Set the initial pointer position for all pointer devices
Rather than just those on the main seat.

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:27 -04:00
Jasper St. Pierre
e23f77f1e6 evdev: Extend the device open callback with a close callback as well
We need to return the device to logind with ReleaseDevice().

https://bugzilla.gnome.org/show_bug.cgi?id=726199
2014-03-13 12:46:27 -04:00
Emmanuele Bassi
aa5a4e9e3c stage: Use the correct types for debug note 2014-03-12 19:30:04 +00:00
Bastian Winkler
70835c904a grid-layout: Use correct orientation when requesting preferred child size
Otherwise width and height are swapped.

https://bugzilla.gnome.org/show_bug.cgi?id=725722
2014-03-12 00:30:40 +01:00
Chun-wei Fan
c1fd29df7a Fix The Win32 Backend for Newer Visual Studio Versions
The GetSystemMetrics() function returns wrong values for SM_CXSIZEFRAME,
SM_CYSIZEFRAME, SM_CXFIXEDFRAME and SM_CYFIXEDFRAME when built with Visual
Studio 2012 and 2013 (unless the XP compatibility setting for the
PlatformToolset entry is turned on), causing the window of Clutter programs
to automatically shrink to a point where they become unusable.

This patch uses AdjustWindowRectEx() for builds using Visual Studio 2012
and later, which deduces the required height and width of the Window
properly.  Unfortunately we can't use this for the VS 2008/2010 builds as
they cause the Window to continually expand as the program is run.

https://bugzilla.gnome.org/show_bug.cgi?id=725873
2014-03-08 18:35:50 +08:00
Chun-wei Fan
acd7d9555c Fix Build of clutter-test-utils.c on Windows
The use of "environ" clashes with a #define in Window's stdlib.h, at least
on Visual Studio, so fix the build by prefixing environ with test_.

https://bugzilla.gnome.org/show_bug.cgi?id=725716
2014-03-08 18:35:49 +08:00
Emmanuele Bassi
c73f45ca7c text: Use the keymap direction when focused
If the ClutterText actor has key focus then we should ask for the
direction of the key map, instead of the direction of the actor.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
3209129d6b x11: Add keymap direction query
We should use the Xkb API to query the direction of the key map,
depending on the group. To get a valid result we need to go over
the Unicode equivalents of the key symbols for each group, so we
should cache the result.

The code used to query and cache the key map direction is taken
from GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
a000349978 backend: Add private accessor for the keymap direction
We need to ask the backend (wherever possible) for the direction of the
current keymap.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
6faf6dfe42 text: Use the resolved text direction
Now that we compute the effective text direction when creating the Pango
layout, we should also use it when painting it.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Emmanuele Bassi
50b6b59d02 text: Discover the direction of the contents
We should set the direction on the PangoContext when creating a
PangoLayout based on a best effort between the contents of the text
itself and the text direction of the widget, in case that fails.

https://bugzilla.gnome.org/show_bug.cgi?id=705779
2014-03-03 23:42:33 +00:00
Jasper St. Pierre
9b097eb4d8 device-manager-evdev: Make sure to reset released when reclaiming devices
Otherwise, Clutter will tell us that we forgot to call reclaim_devices
the next time we call release_devices... but we didn't!
2014-03-03 11:57:58 -05:00
Adel Gadllah
4a3ad9c3af DeviceManagerXi2: Cache the client pointer
Currently clutter_device_manager_xi2_get_core_device always
does a round trip to query the client.

So avoid that by caching the client pointer and only update it when the
xi devices change.

https://bugzilla.gnome.org/show_bug.cgi?id=725561
2014-03-03 15:06:11 +01:00