Ignore:
Timestamp:
May 15, 2011, 6:22:25 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: rename Jwindow's x and y members to m_pos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/pmenu.cpp

    r655 r659  
    191191  int cx1, cy1, cx2, cy2;
    192192  main_screen->GetClip(cx1, cy1, cx2, cy2);
    193   if (parent->x+w+x>=cx2)
    194     x=cx2-1-w-parent->x;
    195   if (h+y+parent->y>=cy2)
    196   {
    197     if (parent->y+parent->h+wm->font()->height()>=cy2)
     193  if (parent->m_pos.x + w + x >= cx2)
     194    x=cx2-1-w-parent->m_pos.x;
     195  if (h+y+parent->m_pos.y>=cy2)
     196  {
     197    if (parent->m_pos.y+parent->h+wm->font()->height()>=cy2)
    198198      y=-h;
    199199    else y=y-h+wm->font()->height()+5;
     
    201201
    202202
    203   win=wm->new_window(parent->x+x,parent->y+y,
     203  win=wm->new_window(parent->m_pos.x+x,parent->m_pos.y+y,
    204204             w - Jwindow::left_border() - Jwindow::right_border(),
    205205             h - Jwindow::top_border() - Jwindow::bottom_border(),
     
    325325  main_screen->GetClip(cx1, cy1, cx2, cy2);
    326326
    327   x=win->x;
    328   y=win->y;
     327  x=win->m_pos.x;
     328  y=win->m_pos.y;
    329329
    330330  int has_flags=0,dx=3;
     
    353353    } else return 1;
    354354  } else if (active!=-1)
    355     return item_num(active)->handle_event(win,win->x+dx,win->y+3+active*(th+1),w-6,0,ev);
     355    return item_num(active)->handle_event(win,win->m_pos.x+dx,win->m_pos.y+3+active*(th+1),w-6,0,ev);
    356356  else return 0;
    357357
     
    362362                 Event &ev)
    363363{
    364   x+=parent->x;
    365   y+=parent->y;
     364  x+=parent->m_pos.x;
     365  y+=parent->m_pos.y;
    366366  if (ev.mouse_move.x>=x && ev.mouse_move.y>=y && ev.mouse_move.x<x+w &&
    367367      ev.mouse_move.y<y+wm->font()->height()+2)
     
    386386  int cx1, cy1, cx2, cy2;
    387387  screen->GetClip(cx1, cy1, cx2, cy2);
    388   mx-=bar->x;
    389   my-=bar->y;
     388  mx-=bar->m_pos.x;
     389  my-=bar->m_pos.y;
    390390  if (mx<0 || my<0 || mx>=bar->m_surf->Size().x || my>=bar->m_surf->Size().y) return NULL;
    391391  else
Note: See TracChangeset for help on using the changeset viewer.