mirror of https://github.com/davatorium/rofi.git
only allow normal mode in dmenu mode.
This commit is contained in:
parent
1a23add631
commit
ec1f399e32
|
@ -73,6 +73,8 @@ GC gc = NULL;
|
||||||
Colormap map = None;
|
Colormap map = None;
|
||||||
XVisualInfo vinfo;
|
XVisualInfo vinfo;
|
||||||
|
|
||||||
|
unsigned int normal_window_mode = FALSE;
|
||||||
|
|
||||||
typedef struct _Mode
|
typedef struct _Mode
|
||||||
{
|
{
|
||||||
Switcher *sw;
|
Switcher *sw;
|
||||||
|
@ -213,7 +215,7 @@ static Window create_window ( Display *display )
|
||||||
XSetLineAttributes ( display, gc, 2, line_style, CapButt, JoinMiter );
|
XSetLineAttributes ( display, gc, 2, line_style, CapButt, JoinMiter );
|
||||||
XSetForeground ( display, gc, color_separator ( display ) );
|
XSetForeground ( display, gc, color_separator ( display ) );
|
||||||
// make it an unmanaged window
|
// make it an unmanaged window
|
||||||
if ( find_arg ( "-normal-window" ) < 0 ) {
|
if ( !normal_window_mode ) {
|
||||||
window_set_atom_prop ( display, box, netatoms[_NET_WM_STATE], &netatoms[_NET_WM_STATE_ABOVE], 1 );
|
window_set_atom_prop ( display, box, netatoms[_NET_WM_STATE], &netatoms[_NET_WM_STATE_ABOVE], 1 );
|
||||||
XSetWindowAttributes sattr = { .override_redirect = True };
|
XSetWindowAttributes sattr = { .override_redirect = True };
|
||||||
XChangeWindowAttributes ( display, box, CWOverrideRedirect, &sattr );
|
XChangeWindowAttributes ( display, box, CWOverrideRedirect, &sattr );
|
||||||
|
@ -1998,6 +2000,7 @@ int main ( int argc, char *argv[] )
|
||||||
|
|
||||||
// Dmenu mode.
|
// Dmenu mode.
|
||||||
if ( dmenu_mode == TRUE ) {
|
if ( dmenu_mode == TRUE ) {
|
||||||
|
normal_window_mode = find_arg ( "-normal-window" ) >= 0;
|
||||||
// force off sidebar mode:
|
// force off sidebar mode:
|
||||||
config.sidebar_mode = FALSE;
|
config.sidebar_mode = FALSE;
|
||||||
int retv = run_dmenu ();
|
int retv = run_dmenu ();
|
||||||
|
|
Loading…
Reference in New Issue