Ticket #3774: mcedit - fix mouse active area for maximize / close buttons
Signed-off-by: Yury V. Zaytsev <yury@shurup.com> Signed-off-by: Egmont Koblinger <egmont@gmail.com>
Этот коммит содержится в:
родитель
9ccd22310a
Коммит
fa951f8c5d
@ -889,7 +889,7 @@ edit_dialog_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event)
|
|||||||
top = l;
|
top = l;
|
||||||
|
|
||||||
/* Handle fullscreen/close buttons in the top line */
|
/* Handle fullscreen/close buttons in the top line */
|
||||||
x = w->cols - 5;
|
x = w->cols - 6;
|
||||||
|
|
||||||
if (top != NULL && event->x >= x)
|
if (top != NULL && event->x >= x)
|
||||||
{
|
{
|
||||||
@ -1093,9 +1093,9 @@ edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event)
|
|||||||
{
|
{
|
||||||
if (event->y == 0)
|
if (event->y == 0)
|
||||||
{
|
{
|
||||||
if (event->x == close_x)
|
if (event->x >= close_x - 1 && event->x <= close_x + 1)
|
||||||
; /* do nothing (see MSG_MOUSE_CLICK) */
|
; /* do nothing (see MSG_MOUSE_CLICK) */
|
||||||
else if (event->x == toggle_fullscreen_x)
|
else if (event->x >= toggle_fullscreen_x - 1 && event->x <= toggle_fullscreen_x + 1)
|
||||||
; /* do nothing (see MSG_MOUSE_CLICK) */
|
; /* do nothing (see MSG_MOUSE_CLICK) */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1125,9 +1125,9 @@ edit_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event)
|
|||||||
case MSG_MOUSE_CLICK:
|
case MSG_MOUSE_CLICK:
|
||||||
if (event->y == 0)
|
if (event->y == 0)
|
||||||
{
|
{
|
||||||
if (event->x == close_x)
|
if (event->x >= close_x - 1 && event->x <= close_x + 1)
|
||||||
send_message (w->owner, NULL, MSG_ACTION, CK_Close, NULL);
|
send_message (w->owner, NULL, MSG_ACTION, CK_Close, NULL);
|
||||||
else if (event->x == toggle_fullscreen_x)
|
else if (event->x >= toggle_fullscreen_x - 1 && event->x <= toggle_fullscreen_x + 1)
|
||||||
edit_toggle_fullscreen (edit);
|
edit_toggle_fullscreen (edit);
|
||||||
else if (!edit->fullscreen && event->count == GPM_DOUBLE)
|
else if (!edit->fullscreen && event->count == GPM_DOUBLE)
|
||||||
/* double click on top line (toggle fullscreen) */
|
/* double click on top line (toggle fullscreen) */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user