mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
Remove warnings
* Remove assigned but not used variables (GCC 4.6) * Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need to be tweaked on a per-implementation basis as problems arise)
This commit is contained in:
committed by
Carlos R. Mafra
parent
43c7abe79f
commit
f65b99e615
@@ -802,7 +802,7 @@ static void move_menus(WMenu * menu, int x, int y)
|
||||
static void makeVisible(WMenu * menu)
|
||||
{
|
||||
WScreen *scr = menu->frame->screen_ptr;
|
||||
int x1, y1, x2, y2, new_x, new_y, move;
|
||||
int x1, y1, x2, y2, new_x, new_y;
|
||||
WMRect rect = wGetRectForHead(scr, wGetHeadForPointerLocation(scr));
|
||||
|
||||
if (menu->entry_no < 0)
|
||||
@@ -815,22 +815,17 @@ static void makeVisible(WMenu * menu)
|
||||
|
||||
new_x = x1;
|
||||
new_y = y1;
|
||||
move = 0;
|
||||
|
||||
if (x1 < rect.pos.x) {
|
||||
new_x = rect.pos.x;
|
||||
move = 1;
|
||||
} else if (x2 >= rect.pos.x + rect.size.width) {
|
||||
new_x = rect.pos.x + rect.size.width - MENUW(menu) - 1;
|
||||
move = 1;
|
||||
}
|
||||
|
||||
if (y1 < rect.pos.y) {
|
||||
new_y = rect.pos.y;
|
||||
move = 1;
|
||||
} else if (y2 >= rect.pos.y + rect.size.height) {
|
||||
new_y = rect.pos.y + rect.size.height - menu->entry_height - 1;
|
||||
move = 1;
|
||||
}
|
||||
|
||||
new_y = new_y - menu->frame->top_width - menu->selected_entry * menu->entry_height;
|
||||
|
||||
Reference in New Issue
Block a user