File: genericmenu.cc

package info (click to toggle)
aewm%2B%2B 1.1.2-4.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 208 kB
  • ctags: 424
  • sloc: cpp: 3,016; makefile: 82; sh: 35
file content (36 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * frankhale@gmail.com
 * http://frankhale.org
 *
 * This code is released under the GPL license www.gnu.org
 */
#include "aewm.hh"

GenericMenu::GenericMenu(Display * dpy) : BaseMenu(dpy)
{
}

GenericMenu::~GenericMenu()
{
	menuList.clear();
}

BaseMenu* GenericMenu::findMenu(Window w)
{
	if (w && w != DefaultRootWindow(dpy)) {
		if(menuList.size()) 
		{
			list<BaseMenu*>::iterator menu_it;

			for(menu_it = menuList.begin(); menu_it != menuList.end(); menu_it++)
			{
				if (w == (*menu_it)->getMenuWindow())
				{
					return (*menu_it);
				}				
			}
		}
	}

	return NULL;	
}