[amiwm] Update to 0.22pl2

This notably includes full screen support!

Addresses Issue #12
This commit is contained in:
Adrian Chadd
2023-12-21 22:09:25 -08:00
parent 9b3846e15a
commit def62797f9
10 changed files with 265 additions and 60 deletions

30
main.c
View File

@@ -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: