mirror of https://github.com/davatorium/rofi.git
Fix #64
* Properly inverse the previous expression. (XGetWindowAttributes() == 0)
This commit is contained in:
parent
e4b4aadad4
commit
d584987c81
|
@ -932,7 +932,6 @@ Window create_window ( Display *display )
|
||||||
color_get ( display, config.menu_bg ) );
|
color_get ( display, config.menu_bg ) );
|
||||||
XSelectInput ( display, box, ExposureMask );
|
XSelectInput ( display, box, ExposureMask );
|
||||||
|
|
||||||
|
|
||||||
gc = XCreateGC ( display, box, 0, 0 );
|
gc = XCreateGC ( display, box, 0, 0 );
|
||||||
XSetLineAttributes ( display, gc, 2, LineOnOffDash, CapButt, JoinMiter );
|
XSetLineAttributes ( display, gc, 2, LineOnOffDash, CapButt, JoinMiter );
|
||||||
XSetForeground ( display, gc, color_get ( display, config.menu_bc ) );
|
XSetForeground ( display, gc, color_get ( display, config.menu_bc ) );
|
||||||
|
@ -941,7 +940,6 @@ Window create_window ( Display *display )
|
||||||
XSetWindowAttributes sattr;
|
XSetWindowAttributes sattr;
|
||||||
sattr.override_redirect = True;
|
sattr.override_redirect = True;
|
||||||
XChangeWindowAttributes ( display, box, CWOverrideRedirect, &sattr );
|
XChangeWindowAttributes ( display, box, CWOverrideRedirect, &sattr );
|
||||||
main_window = box;
|
|
||||||
|
|
||||||
// Set the WM_NAME
|
// Set the WM_NAME
|
||||||
XStoreName ( display, box, "rofi" );
|
XStoreName ( display, box, "rofi" );
|
||||||
|
@ -1062,7 +1060,7 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
||||||
|
|
||||||
// main window isn't explicitly destroyed in case we switch modes. Reusing it prevents flicker
|
// main window isn't explicitly destroyed in case we switch modes. Reusing it prevents flicker
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
if ( main_window == None || XGetWindowAttributes ( display, main_window, &attr ) ) {
|
if ( main_window == None || XGetWindowAttributes ( display, main_window, &attr ) == 0 ) {
|
||||||
main_window = create_window ( display );
|
main_window = create_window ( display );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue