mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
[amiwm] Update to 0.22pl2
This notably includes full screen support! Addresses Issue #12
This commit is contained in:
30
main.c
30
main.c
@@ -45,6 +45,23 @@
|
||||
#include "icc.h"
|
||||
#include "libami.h"
|
||||
|
||||
#ifdef AMIGAOS
|
||||
#include <pragmas/xlib_pragmas.h>
|
||||
extern struct Library *XLibBase;
|
||||
|
||||
struct timeval {
|
||||
long tv_sec;
|
||||
long tv_usec;
|
||||
};
|
||||
|
||||
#define fd_set XTransFdset
|
||||
#undef FD_ZERO
|
||||
#undef FD_SET
|
||||
#define FD_ZERO XTransFdZero
|
||||
#define FD_SET XTransFdSet
|
||||
#define select XTransSelect
|
||||
#endif
|
||||
|
||||
#define HYSTERESIS 5
|
||||
|
||||
typedef struct _DragIcon {
|
||||
@@ -550,6 +567,11 @@ void endicondragging(XEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
if (!scr->deftitle) {
|
||||
badicondrop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(XTranslateCoordinates(dpy, scr->root, scr->back,
|
||||
e->xbutton.x_root, e->xbutton.y_root,
|
||||
&wx, &wy, &ch) && ch!=None) {
|
||||
@@ -723,7 +745,7 @@ void do_icon_double_click(Scrn *scr)
|
||||
deselecticon(i);
|
||||
if((c=(i->client))) {
|
||||
XMapWindow(dpy, c->window);
|
||||
if(c->parent!=c->scr->root)
|
||||
if(c->parent!=c->scr->root && !c->fullscreen)
|
||||
XMapRaised(dpy, c->parent);
|
||||
setclientstate(c, NormalState);
|
||||
}
|
||||
@@ -1044,7 +1066,8 @@ int main(int argc, char *argv[])
|
||||
XDeleteContext(dpy, event.xdestroywindow.window, screen_context);
|
||||
break;
|
||||
case UnmapNotify:
|
||||
if(c && c->active && (event.xunmap.window==c->parent)) {
|
||||
if(c && c->active && (event.xunmap.window==c->parent) &&
|
||||
!(c->fullscreen && c->state == NormalState)) {
|
||||
c->active=False;
|
||||
activeclient = NULL;
|
||||
redrawclient(c);
|
||||
@@ -1198,7 +1221,8 @@ int main(int argc, char *argv[])
|
||||
reparent(c);
|
||||
case NormalState:
|
||||
XMapWindow(dpy, c->window);
|
||||
XMapRaised(dpy, c->parent);
|
||||
if (!c->fullscreen)
|
||||
XMapRaised(dpy, c->parent);
|
||||
setclientstate(c, NormalState);
|
||||
break;
|
||||
case IconicState:
|
||||
|
||||
Reference in New Issue
Block a user