add mouse action : maximize_restore, fixed issue 125

git-svn-id: http://tint2.googlecode.com/svn/trunk@156 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
lorthiois@bbsoft.fr
2009-08-09 15:57:18 +00:00
parent 027411ca16
commit fe2111c8fd
8 changed files with 50 additions and 36 deletions

View File

@@ -28,7 +28,7 @@ FXint fxmalloc(void** ptr,unsigned long size){
*/
// mouse actions
enum { NONE=0, CLOSE, TOGGLE, ICONIFY, SHADE, TOGGLE_ICONIFY };
enum { NONE=0, CLOSE, TOGGLE, ICONIFY, SHADE, TOGGLE_ICONIFY, MAXIMIZE_RESTORE, MAXIMIZE, RESTORE };
#define ALLDESKTOP 0xFFFFFFFF

View File

@@ -65,22 +65,13 @@ void window_toggle_shade (Window win)
send_event32 (win, server.atom._NET_WM_STATE, 2, server.atom._NET_WM_STATE_SHADED, 0);
}
/*
int x11_send_expose(Display *dpy, Window dst, int x, int y, int width, int height)
void window_maximize_restore (Window win)
{
XEvent xe;
int rc;
xe.type = Expose;
xe.xexpose.window = dst;
xe.xexpose.x = x;
xe.xexpose.y = y;
xe.xexpose.width = width;
xe.xexpose.height = height;
xe.xexpose.count = 0;
rc = XSendEvent(tray_data.dpy, dst, True, NoEventMask, &xe);
return x11_ok() && rc != 0;
send_event32 (win, server.atom._NET_WM_STATE, 2, server.atom._NET_WM_STATE_MAXIMIZED_VERT, 0);
send_event32 (win, server.atom._NET_WM_STATE, 2, server.atom._NET_WM_STATE_MAXIMIZED_HORZ, 0);
}
*/
int window_is_hidden (Window win)
{

View File

@@ -23,6 +23,7 @@ int window_is_hidden (Window win);
int window_is_active (Window win);
int get_icon_count (long *data, int num);
long *get_best_icon (long *data, int icon_count, int num, int *iw, int *ih, int best_icon_size);
void window_maximize_restore (Window win);
void window_toggle_shade (Window win);
int window_get_desktop (Window win);
void windows_set_desktop (Window win, int desktop);