On Thu, 04 Apr 2013, BALATON Zoltan escribió:

> On Thu, 4 Apr 2013, Rodolfo García Peñas wrote:
> >dock.c:
> >------------8<------------------
> >       wMenuMapAt(dock->menu, x_pos, event->xbutton.y_root + 2, False);
> >------------8<------------------
> 
> So this is where the two pixel gap comes from. It may work with
> Scroll off screen menus turned on if the + 2 is simply removed but I
> don't want to recompile to try this now. Annyone wants to test?

In line 3222:
------------8<------------------
        if (dock->type == WM_CLIP) {
                /*x_pos = event->xbutton.x_root+2; */
                x_pos = event->xbutton.x_root - dock->menu->frame->core->width 
/ 2 - 1;
                if (x_pos < 0) {
                        x_pos = 0;
                } else if (x_pos + dock->menu->frame->core->width > 
scr->scr_width - 2) {
                        x_pos = scr->scr_width - dock->menu->frame->core->width 
- 4;
                }
        } else {
                x_pos = dock->on_right_side ? scr->scr_width - 
dock->menu->frame->core->width - 3 : 0;
        }

        wMenuMapAt(dock->menu, x_pos, event->xbutton.y_root + 2, False);
------------8<------------------

or line 3761:
------------8<------------------
        xpos = event->xbutton.x_root - wsMenu->frame->core->width / 2 - 1;
        if (xpos < 0) {
                xpos = 0;
        } else if (xpos + wsMenu->frame->core->width > scr->scr_width - 2) {
                xpos = scr->scr_width - wsMenu->frame->core->width - 4;
        }
        wMenuMapAt(wsMenu, xpos, event->xbutton.y_root + 2, False);
------------8<------------------

Remove the "+ 2" is ok, but I think we should thing in change the things to 
re-use the same functions.

Anyway, if we remove the "+ 2" (line 3222), the problem with the Clip (probably 
Dock) is gone. But, the menu is hidden, you must move the mouse down to see it 
(you cannot see nothing). In my patch, the menu is moved up 20 pixels, then, 
the first menú entry is painted in the screen and you know that the menu is 
there, partially hidden, but there.

kix
-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to [email protected].

Reply via email to