mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
Revert "Merge pull request #34 from phillbush/localize-2"
This reverts commitb9e7c7313d, reversing changes made to774f98ef87. It broke ToolItem input; will need to dig into this a bit more.
This commit is contained in:
35
screen.c
35
screen.c
@@ -418,38 +418,3 @@ Scrn *getscreenbyroot(Window w)
|
||||
{
|
||||
return getscreenbyrootext(w, 0);
|
||||
}
|
||||
|
||||
void click_screendepth(Scrn *s, Time time)
|
||||
{
|
||||
extern void redrawmenubar(Scrn *, Window);
|
||||
extern void get_drag_event(XEvent *event);
|
||||
extern Scrn *mbdclick;
|
||||
int status;
|
||||
|
||||
XSync(dpy, False);
|
||||
status = XGrabPointer(dpy, s->menubardepth, True, ButtonPressMask|ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, False, None, time);
|
||||
if (status != AlreadyGrabbed && status != GrabSuccess)
|
||||
return;
|
||||
mbdclick = s;
|
||||
redrawmenubar(s, s->menubardepth);
|
||||
for (;;) {
|
||||
XEvent event;
|
||||
|
||||
get_drag_event(&event);
|
||||
if (event.type == ButtonRelease || event.type == ButtonPress) {
|
||||
mbdclick = NULL;
|
||||
redrawmenubar(s, s->menubardepth);
|
||||
XUngrabPointer(dpy, event.xbutton.time);
|
||||
if (event.type == ButtonPress)
|
||||
return;
|
||||
if (event.xbutton.x < 0 || event.xbutton.y < 0)
|
||||
return; /* pointer to left/top of button */
|
||||
if (event.xbutton.x >= 23 || event.xbutton.y >= s->bh)
|
||||
return; /* pointer to right/bottom of button */
|
||||
if(event.xbutton.window == s->menubardepth)
|
||||
screentoback();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user