#include "client.h"
#include "xerror.h"
#include "prop.h"
+#include "config.h"
#include "screen.h"
#include "frame.h"
-#include "engine.h"
+#include "framerender.h"
#include "focus.h"
#include "stacking.h"
#include "extensions.h"
#include "timer.h"
-#include "engine.h"
#include "dispatch.h"
#include <X11/Xlib.h>
int i=0;
switch (e->type) {
+ case ButtonPress:
+ case ButtonRelease:
+ switch (frame_context(client, e->xbutton.window)) {
+ case Context_Maximize:
+ client->frame->max_press = (e->type == ButtonPress);
+ framerender_frame(client->frame);
+ break;
+ case Context_Close:
+ client->frame->close_press = (e->type == ButtonPress);
+ framerender_frame(client->frame);
+ break;
+ case Context_Iconify:
+ client->frame->iconify_press = (e->type == ButtonPress);
+ framerender_frame(client->frame);
+ break;
+ case Context_AllDesktops:
+ client->frame->desk_press = (e->type == ButtonPress);
+ framerender_frame(client->frame);
+ break;
+ case Context_Shade:
+ client->frame->shade_press = (e->type == ButtonPress);
+ framerender_frame(client->frame);
+ break;
+ default:
+ /* nothing changes with clicks for any other contexts */
+ break;
+ }
+ break;
case FocusIn:
focus_set_client(client);
case FocusOut:
#endif
/* focus state can affect the stacking layer */
client_calc_layer(client);
- engine_frame_adjust_focus(client->frame);
+ frame_adjust_focus(client->frame);
break;
case EnterNotify:
if (client_normal(client)) {
client);
focus_order[desktop] = g_list_prepend(focus_order[desktop],
client);
- } else if (focus_follow) {
+ } else if (config_focus_follow) {
#ifdef DEBUG_FOCUS
g_message("EnterNotify on %lx, focusing window",
client->window);
if (ce.xconfigurerequest.value_mask & CWStackMode)
e->xconfigurerequest.detail = ce.xconfigurerequest.detail;
}
- if (i) g_message("Compressed %d Configures", i);
/* if we are iconic (or shaded (fvwm does this)) ignore the event */
if (client->iconic || client->shaded) return;
client_unmanage(client);
break;
case MapRequest:
+ g_message("MapRequest for 0x%lx", client->window);
if (!client->iconic) break; /* this normally doesn't happen, but if it
does, we don't want it! */
if (screen_showing_desktop)
#ifdef SHAPE
if (extensions_shape && e->type == extensions_shape_event_basep) {
client->shaped = ((XShapeEvent*)e)->shaped;
- engine_frame_adjust_shape(client->frame);
+ frame_adjust_shape(client->frame);
}
#endif
}