Martin Minarik
e0f798071c
wlt: toolkit: fix resize window stuck in need_resize=true
The problem is that:
wnd->w_frame contains a number
and
wnd->need_frame=true
Therefore schedule_frame() doesn't schedule the callback.
But deleting these checks causes flicker. Further redesign
of the frame sheduling was necessary.
4. frame_callback()
3. do_frame()
3. idle_frame()
2. schedule_frame()
1. wlt_window_set_size()
Please, observe the need_resize variable.
-------------------------------------------------------------------------------
BAD (window stuck on resize):
$3 = {ref = 1, list = {next = 0x659c70, prev = 0x659c70},
buffer_attached = true, skip_damage = false, need_resize = true,
w_frame = 0x70d9b0, widget_list = {next = 0x686cb0, prev = 0x6b54d0}}
OK (window not stuck on resize):
$3 = {ref = 1, list = {next = 0x240cc70, prev = 0x240cc70},
buffer_attached = true, skip_damage = false, need_resize = false,
w_frame = 0x241bb10, widget_list = {next = 0x2439cb0, prev = 0x2468560}}
-----------------------------------------------------------------------------------
This is the basic idea:
-> time ->
frame callbacks() * * * * * *
wnd->idle_pending ------ --------- --------- -------- ---------------------
wnd->need_frame --- --- --- --- --- ------ ---
schedule_frame() * * * * * * * **
idle_frame() * * * * * * * *
This design follows similiar design in weston/clients/window.c
Kmscon Weston
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wlt_window_do_redraw() ~~~ shm_surface_swap()
do_frame() ~~~~~~~~~~~~~~~ window_attach_surface()
wnd->idle_pending ~~~~~~~~ window->redraw_scheduled
frame_callback() ~~~~~~~~ frame_callback()
do_frame() ~~~~~~~~~~~~~~ idle_redraw()
wlt_window_set_size()
wlt_window_schedule_redraw()
schedule_frame() ~~~~~~~~ window_schedule_redraw()
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 20:13:09 +01:00
..
2012-10-24 15:46:19 +02:00
2012-10-27 18:50:03 +02:00
2013-01-13 11:54:29 +01:00
2013-01-13 11:54:29 +01:00
2013-01-07 18:03:45 +01:00
2013-01-07 18:03:45 +01:00
2013-01-07 18:03:45 +01:00
2013-01-03 16:55:56 +01:00
2013-01-07 18:03:45 +01:00
2013-01-03 16:55:56 +01:00
2013-01-07 18:03:45 +01:00
2012-10-05 13:20:24 +02:00
2013-01-03 16:55:56 +01:00
2013-01-02 15:51:54 +01:00
2013-01-07 19:22:38 +01:00
2012-10-26 18:08:35 +02:00
2013-01-24 16:42:03 +01:00
2012-12-12 21:24:15 +01:00
2013-01-13 16:06:00 +01:00
2012-10-24 18:52:54 +02:00
2013-01-24 16:42:03 +01:00
2013-01-03 17:36:23 +01:00
2013-01-15 16:30:49 +01:00
2013-01-03 17:04:55 +01:00
2013-01-03 17:41:50 +01:00
2013-01-03 17:03:31 +01:00
2013-01-24 12:13:29 +01:00
2013-01-03 17:04:33 +01:00
2013-01-03 16:21:18 +01:00
2013-01-03 16:21:18 +01:00
2013-01-03 16:21:18 +01:00
2013-01-07 19:31:27 +01:00
2013-01-07 19:31:27 +01:00
2013-01-14 20:57:15 +01:00
2012-10-24 18:52:54 +02:00
2013-01-02 15:51:54 +01:00
2012-09-30 15:41:08 +02:00
2013-01-13 15:58:40 +01:00
2012-12-12 21:20:45 +01:00
2012-11-19 13:54:17 +01:00
2012-11-10 16:42:42 +01:00
2012-09-18 12:14:53 +02:00
2013-01-13 19:30:35 +01:00
2012-09-30 15:41:08 +02:00
2012-12-30 19:41:08 +01:00
2013-01-03 14:00:57 +01:00
2012-10-29 20:34:52 +01:00
2012-09-16 17:08:21 +02:00
2012-08-08 19:11:42 +02:00
2012-08-08 19:11:42 +02:00
2012-08-08 19:11:42 +02:00
2012-08-08 19:11:42 +02:00
2012-08-08 19:11:42 +02:00
2012-08-08 19:11:42 +02:00
2012-08-08 12:26:35 +02:00
2012-09-18 09:18:50 +02:00
2012-09-18 09:18:50 +02:00
2012-08-10 11:43:07 +02:00
2012-08-10 11:43:07 +02:00
2013-01-07 18:03:45 +01:00
2013-01-07 18:03:45 +01:00
2013-01-24 14:04:04 +01:00
2013-01-14 20:57:15 +01:00
2013-01-24 14:11:22 +01:00
2013-01-07 18:03:45 +01:00
2013-01-24 12:13:29 +01:00
2012-12-10 16:09:28 +01:00
2012-12-10 16:00:08 +01:00
2012-12-10 15:36:04 +01:00
2012-12-10 15:36:04 +01:00
2012-09-18 16:54:25 +02:00
2012-12-02 10:15:40 +01:00
2012-10-09 12:30:40 +02:00
2013-01-24 14:42:54 +01:00
2013-01-24 14:42:54 +01:00
2013-01-24 14:42:54 +01:00
2013-01-24 16:42:03 +01:00
2013-01-24 16:42:03 +01:00
2013-01-24 16:42:03 +01:00
2013-01-13 15:26:56 +01:00
2013-01-13 15:26:56 +01:00
2013-01-24 10:24:18 +01:00
2013-01-12 13:31:17 +01:00
2013-01-24 10:24:18 +01:00
2013-01-07 19:22:38 +01:00
2013-01-07 19:22:38 +01:00
2013-01-13 11:42:04 +01:00
2013-01-07 19:22:38 +01:00
2013-01-07 19:37:44 +01:00
2013-01-07 19:37:44 +01:00
2013-01-07 19:37:44 +01:00
2013-01-07 19:37:44 +01:00
2013-01-24 16:42:03 +01:00
2013-01-24 16:42:03 +01:00
2013-01-24 16:42:03 +01:00
2013-01-13 11:54:29 +01:00
2013-01-07 19:31:27 +01:00
2013-01-02 18:14:48 +01:00
2012-10-07 15:31:53 +02:00
2013-01-07 18:03:45 +01:00
2012-09-27 19:08:41 +02:00
2012-10-15 17:30:27 +02:00
2012-09-26 18:56:41 +02:00
2013-01-24 20:13:09 +01:00
2012-10-09 12:30:40 +02:00