Skip to content
Snippets Groups Projects
Commit dcd949fe authored by deuce's avatar deuce
Browse files

Clicking outside a window exits.

Fix window border detection for clicks.
parent 5d72e712
No related branches found
No related tags found
No related merge requests found
......@@ -780,7 +780,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
if((i=uifc_getmouse(&mevnt))==0) {
/* Clicked in menu */
if(mevnt.startx>=s_left+left+3
&& mevnt.startx<=s_left+left+width+1
&& mevnt.startx<=s_left+left+width-2
&& mevnt.starty>=s_top+top+3
&& mevnt.starty<=(s_top+top+height)-2
&& mevnt.event==CIOLIB_BUTTON_1_CLICK) {
......@@ -838,6 +838,12 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
&& mevnt.event==CIOLIB_BUTTON_1_CLICK) {
i=CIO_KEY_NPAGE;
}
/* Clicked Outside of Window */
if(mevnt.startx<s_left+left
|| mevnt.startx>s_left+left+width-1
|| mevnt.starty<s_top+top
|| mevnt.starty>s_top+top+height-1)
i=ESC;
}
}
if(i>255) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment