Have the fullscreen mode (triggered by not setting CTK_CONF_WINDOWS) work with mouse support.
This commit is contained in:
parent
f51a6a6807
commit
80d47e851f
1 changed files with 13 additions and 5 deletions
|
@ -44,7 +44,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: ctk.c,v 1.16 2007/12/15 21:04:20 oliverschmidt Exp $
|
* $Id: ctk.c,v 1.17 2007/12/15 21:29:46 oliverschmidt Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1561,6 +1561,7 @@ PROCESS_THREAD(ctk_process, ev, data)
|
||||||
} else {
|
} else {
|
||||||
#endif /* CTK_CONF_MENUS */
|
#endif /* CTK_CONF_MENUS */
|
||||||
|
|
||||||
|
#if CTK_CONF_WINDOWS
|
||||||
/* Walk through the windows from top to bottom to see in
|
/* Walk through the windows from top to bottom to see in
|
||||||
which window the mouse pointer is. */
|
which window the mouse pointer is. */
|
||||||
if(dialog != NULL) {
|
if(dialog != NULL) {
|
||||||
|
@ -1598,8 +1599,10 @@ PROCESS_THREAD(ctk_process, ev, data)
|
||||||
windows->focused != NULL){
|
windows->focused != NULL){
|
||||||
unfocus_widget(windows->focused);
|
unfocus_widget(windows->focused);
|
||||||
}
|
}
|
||||||
|
#endif /* CTK_CONF_WINDOWS */
|
||||||
|
|
||||||
if(window != NULL) {
|
if(window != NULL) {
|
||||||
|
#if CTK_CONF_WINDOWS
|
||||||
/* If the mouse was clicked outside of the current window,
|
/* If the mouse was clicked outside of the current window,
|
||||||
we bring the clicked window to front. */
|
we bring the clicked window to front. */
|
||||||
if(dialog == NULL &&
|
if(dialog == NULL &&
|
||||||
|
@ -1610,6 +1613,7 @@ PROCESS_THREAD(ctk_process, ev, data)
|
||||||
ctk_window_open(window);
|
ctk_window_open(window);
|
||||||
redraw |= REDRAW_ALL;
|
redraw |= REDRAW_ALL;
|
||||||
} else {
|
} else {
|
||||||
|
#endif /* CTK_CONF_WINDOWS */
|
||||||
|
|
||||||
/* Find out which widget currently is under the mouse
|
/* Find out which widget currently is under the mouse
|
||||||
pointer and give it focus, unless it already has
|
pointer and give it focus, unless it already has
|
||||||
|
@ -1634,9 +1638,11 @@ PROCESS_THREAD(ctk_process, ev, data)
|
||||||
/* if the mouse is moved in the focused window, we emit
|
/* if the mouse is moved in the focused window, we emit
|
||||||
a ctk_signal_pointer_move signal to the owner of the
|
a ctk_signal_pointer_move signal to the owner of the
|
||||||
window. */
|
window. */
|
||||||
if(mouse_moved &&
|
if(mouse_moved
|
||||||
(window != &desktop_window ||
|
#if CTK_CONF_WINDOWS
|
||||||
windows == NULL)) {
|
&& (window != &desktop_window || windows == NULL)
|
||||||
|
#endif /* CTK_CONF_WINDOWS */
|
||||||
|
) {
|
||||||
|
|
||||||
process_post(window->owner, ctk_signal_pointer_move, NULL);
|
process_post(window->owner, ctk_signal_pointer_move, NULL);
|
||||||
|
|
||||||
|
@ -1661,7 +1667,9 @@ PROCESS_THREAD(ctk_process, ev, data)
|
||||||
redraw |= activate(widget);
|
redraw |= activate(widget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if CTK_CONF_WINDOWS
|
||||||
}
|
}
|
||||||
|
#endif /* CTK_CONF_WINDOWS */
|
||||||
}
|
}
|
||||||
#if CTK_CONF_MENUS
|
#if CTK_CONF_MENUS
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue