EGLInt is not always uint32_t so we need
to make sure we use the right int size for the format.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
We get the child position but never use this information here. Just remove it.
Spotted by Christopher Michael.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Currently there is no guarentee that output remove event always happend after
page_flip event on the same output. So if the following situation occur:
first: unplug a output
second: output remove event arrive, output_destrory called adn free output
third: page_flip event arrive on the destroyed output
the segment fault will happpen in page_flip_handler().
This patch add a variable drm_compositor->destroy_pending, if page flip
event is pending when output remove event arrive, output_destroy will be
delayed until page flip finished.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
This fixes an uninitialized serial error, were we could send out the
modifier event even if the client didn't have a pointer resource. We
send out the modifier event to let clients know the modifer mask when
they receive a pointer button event. Thus, if the client doesn't have
a pointer we don't need to send the modifier event.
Additionally we would send out the modifier event with an
uninitialized serial number.
Finally, this commit restores the order of sending the modifier event
before the enter, like it used to be. Not likely to be an issue,
since the client will always receive the modifier event before any
button event, but it's a little nicer to give the client the modifier
events before it receives any pointer events.
weston-launch has two supported use cases now: either launch from
and VT login as a regular user (running within that session) or
from an init script (systemd or such) with the -u option to create
a session for the specified user. Running from within X or ssh is
not possible. It's still possible to run weston as root from X or ssh
but that's strictly a development/debug/test feature.
https://bugs.freedesktop.org/show_bug.cgi?id=69727
This is only available when running weston directly as root typically for
ssh logins. It's a somewhat destructive option, as it will take over any
existing VT completely, unless there's already an display server running
there.
https://bugs.freedesktop.org/show_bug.cgi?id=69731
The wake handler set up by the shell will try to unlock the screen
which works by setting up an animation which fades in the display. The
animation is started by first scheduling a repaint. Subsequent
repaints are scheduled whenever the previous frame is finished.
However in the case of the wake up signal the state is still
WESTON_COMPOSITOR_SLEEPING when the animation is started.
weston_output_schedule_repaint() ignores attempts to schedule a
repaint if the compositor is sleeping which means the animation never
gets run and will never complete.
The animation gets unstuck and continues if anything else schedules a
repaint after the state has been changed so the bug only gets hit in
certain conditions. The first wake up creates the lock surface which
causes a redraw when the first buffer is attached so the first wake up
is always ok. A redraw can be triggered in the subsequent wake ups
just by moving the mouse.
A good way to trigger the bug is to try to wake up the compositor by
pressing the shift key. If you let the compositor go back to sleep
after waking it up without unlocking it, the second press of the shift
key will not cause a redraw so the animation will not run and it won't
fade in.
https://bugs.freedesktop.org/show_bug.cgi?id=69719
Add drm_set_master and drm_drop_master
as wrappers for drm(Set|Drop)Master, when building compositor-drm
or as empty functions otherwise.
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Adding a check in weston_config_full_path so that
we don't crash if we started without a config file.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Checking the return value from seteuid in
order to not launch clients with the wrong effective uid.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
We'll add the GBM format code as the native visual ID for EGLConfigs
when running on GBM. This patch lets the drm backend pass in the
format code it's using with KMS and make sure we get a confing that
matches. In the future, mesa will add support for 10 bpc configs
which will match the "at least 8 color bits" requirement. By also
matching the native visual ID, we avoid rendering XRGB2101010 into a
XRGB8888 KMS framebuffer.
Previously only the touch up key event was used for single-touch
devices and the touch down event was generated on the first motion
event. This was breaking if the touch up and down events were sent
without a motion in-between because the evdev driver wouldn't generate
a touch down event and Weston would lose track of the number of touch
points that are down. This patch changes it to track the up and down
key events as pending events similar to how it does for multi-touch
devices.
https://bugs.freedesktop.org/show_bug.cgi?id=69759
Instead of having a mask of pending events there is now an enum with a
single value to represent the one pending event. The event gets
flushed explicitly as part of the handling code for each event type
rather than in the outer event reading loop. The pending event is used
so that we can combine multiple motion events into one and to make
sure that we have recieved the latest position before sending a touch
up or down event. This should fix the following problems with the old
approach:
• If you release a finger and press it down again quickly you could
get the up and down events in the same batch. However the pending
events were always processed in the order down then up so it would
end up notifying two down events and then an up. The pending event
is now always flushed when there is a new up or down event so they
will always be in the right order.
• When it got a slot event it would immediately change the slot number
and then set the pending event. Then when it flushed the events it
would use the new slot number to flush the old pending event so the
events could have the wrong finger. The pending event is now
immediately flushed when a slot event is received so it will have
the right finger.
• If you get more than 32 events in one read then it was resetting the
pending events before processing the next batch in
evdev_process_events. If four fingers were pressed down at once then
it ended up with more than 32 events and the sync message would be
in the second batch. The pending flag for the last finger was
getting cleared so it never got emitted. In this patch the pending
event is no longer reset after reading nor is it explicitly flushed.
Instead it is flushed when we receive a EV_SYN event or a different
pending event needs to replace it.
The touchpad handling code was trying to use the pending event
mechanism to notify the relative motion events. I'm not sure why it
was doing this because it looks the event would effectively get
emitted as soon as the touchpad_process function is finished anyway
and it wasn't accumulating the values. Instead I've just changed it to
emit the event directly.
https://bugs.freedesktop.org/show_bug.cgi?id=67563
Linking failed with missing ceil() here. Making sure that we include
the header and add the missing -lm.
Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Here too we must make sure the surface has a valid resource, as
there are some (xwayland, surfaces created by the shell) that
don't have it.
Fix a Weston crash when setting a mpv window fullscreen on drm.