mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
[amiwm] Fix NULL scr issue
If the clock timer fires when global scr is NULL then we end up calling redrawmenubar() with a NULL global scr, but a valid local scr. So just pass in the scr used when doing "stuff" into redrawmenubar(), making the 'scr' in redrawmenubar() also local scope.
This commit is contained in:
6
frame.c
6
frame.c
@@ -28,7 +28,7 @@ extern Display *dpy;
|
||||
extern XContext client_context, screen_context;
|
||||
extern Cursor wm_curs;
|
||||
extern int shape_extn;
|
||||
extern void redrawmenubar(Window);
|
||||
extern void redrawmenubar(Scrn *, Window);
|
||||
void reshape_frame(Client *c);
|
||||
|
||||
Window creategadget(Client *c, Window p, int x, int y, int w, int h)
|
||||
@@ -510,7 +510,7 @@ void clickenter()
|
||||
{
|
||||
if((scr=mbdscr)&& clickwindow == scr->menubardepth) {
|
||||
mbdclick = scr;
|
||||
redrawmenubar(scr->menubardepth);
|
||||
redrawmenubar(scr, scr->menubardepth);
|
||||
} else {
|
||||
scr = clickclient->scr;
|
||||
redraw(clickclient, clickclient->clicked=clickwindow);
|
||||
@@ -521,7 +521,7 @@ void clickleave()
|
||||
{
|
||||
if((scr=mbdscr)&& clickwindow == scr->menubardepth) {
|
||||
mbdclick = NULL;
|
||||
redrawmenubar(scr->menubardepth);
|
||||
redrawmenubar(scr, scr->menubardepth);
|
||||
} else {
|
||||
scr = clickclient->scr;
|
||||
clickclient->clicked=None;
|
||||
|
||||
Reference in New Issue
Block a user