mirror of https://github.com/davatorium/rofi.git
Update spell.
This commit is contained in:
parent
923dbb93ec
commit
444d09b905
|
@ -52,9 +52,6 @@
|
||||||
|
|
||||||
static inline int execshssh ( const char *host )
|
static inline int execshssh ( const char *host )
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* I am not happy about this code, it causes 7 mallocs and frees
|
|
||||||
*/
|
|
||||||
char **args = NULL;
|
char **args = NULL;
|
||||||
int argsv = 0;
|
int argsv = 0;
|
||||||
helper_parse_setup ( config.ssh_command, &args, &argsv, "{host}", host, NULL );
|
helper_parse_setup ( config.ssh_command, &args, &argsv, "{host}", host, NULL );
|
||||||
|
|
|
@ -149,8 +149,8 @@ static void winlist_free ( winlist *l )
|
||||||
*/
|
*/
|
||||||
static int winlist_find ( winlist *l, Window w )
|
static int winlist_find ( winlist *l, Window w )
|
||||||
{
|
{
|
||||||
// iterate backwards. theory is: windows most often accessed will be
|
// iterate backwards. Theory is: windows most often accessed will be
|
||||||
// nearer the end. testing with kcachegrind seems to support this...
|
// nearer the end. Testing with kcachegrind seems to support this...
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for ( i = ( l->len - 1 ); i >= 0; i-- ) {
|
for ( i = ( l->len - 1 ); i >= 0; i-- ) {
|
||||||
|
@ -356,7 +356,7 @@ SwitcherMode run_switcher_window ( char **input, G_GNUC_UNUSED void *data )
|
||||||
int i;
|
int i;
|
||||||
unsigned int classfield = 0;
|
unsigned int classfield = 0;
|
||||||
unsigned long desktops = 0;
|
unsigned long desktops = 0;
|
||||||
// windows we actually display. may be slightly different to _NET_CLIENT_LIST_STACKING
|
// windows we actually display. May be slightly different to _NET_CLIENT_LIST_STACKING
|
||||||
// if we happen to have a window destroyed while we're working...
|
// if we happen to have a window destroyed while we're working...
|
||||||
winlist *ids = winlist_new ();
|
winlist *ids = winlist_new ();
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ SwitcherMode run_switcher_window ( char **input, G_GNUC_UNUSED void *data )
|
||||||
desktop[0] = 0;
|
desktop[0] = 0;
|
||||||
char *line = g_malloc ( strlen ( c->title ) + strlen ( c->class ) + classfield + 50 );
|
char *line = g_malloc ( strlen ( c->title ) + strlen ( c->class ) + classfield + 50 );
|
||||||
if ( !config_i3_mode ) {
|
if ( !config_i3_mode ) {
|
||||||
// find client's desktop. this is zero-based, so we adjust by since most
|
// find client's desktop. This is zero-based, so we adjust by since most
|
||||||
// normal people don't think like this :-)
|
// normal people don't think like this :-)
|
||||||
if ( !window_get_cardinal_prop ( display, c->window, netatoms[_NET_WM_DESKTOP], &wmdesktop, 1 ) ) {
|
if ( !window_get_cardinal_prop ( display, c->window, netatoms[_NET_WM_DESKTOP], &wmdesktop, 1 ) ) {
|
||||||
wmdesktop = 0xFFFFFFFF;
|
wmdesktop = 0xFFFFFFFF;
|
||||||
|
|
|
@ -65,7 +65,7 @@ char* fgets_s ( char* s, int n, FILE *iop, char sep )
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param info The Match informati on.
|
* @param info To Match information on.
|
||||||
* @param res The string being generated.
|
* @param res The string being generated.
|
||||||
* @param data User data
|
* @param data User data
|
||||||
*
|
*
|
||||||
|
|
|
@ -359,7 +359,7 @@ static void menu_free_state ( MenuState *state )
|
||||||
/**
|
/**
|
||||||
* @param x [out] the calculated x position.
|
* @param x [out] the calculated x position.
|
||||||
* @param y [out] the calculated y position.
|
* @param y [out] the calculated y position.
|
||||||
* @param mon the workarea.
|
* @param mon the work area.
|
||||||
* @param h the required height of the window.
|
* @param h the required height of the window.
|
||||||
* @param w the required width of the window.
|
* @param w the required width of the window.
|
||||||
*/
|
*/
|
||||||
|
@ -576,7 +576,7 @@ static int locate_switcher ( KeySym key, unsigned int modstate )
|
||||||
*/
|
*/
|
||||||
static void menu_keyboard_navigation ( MenuState *state, KeySym key, unsigned int modstate )
|
static void menu_keyboard_navigation ( MenuState *state, KeySym key, unsigned int modstate )
|
||||||
{
|
{
|
||||||
// pressing one of the global key bindings closes the switcher. this allows fast closing of the
|
// pressing one of the global key bindings closes the switcher. This allows fast closing of the
|
||||||
// menu if an item is not selected
|
// menu if an item is not selected
|
||||||
if ( locate_switcher ( key, modstate ) != -1 || key == XK_Escape ) {
|
if ( locate_switcher ( key, modstate ) != -1 || key == XK_Escape ) {
|
||||||
state->retv = MENU_CANCEL;
|
state->retv = MENU_CANCEL;
|
||||||
|
@ -844,7 +844,7 @@ static void menu_update ( MenuState *state )
|
||||||
menu_set_arrow_text ( state->filtered_lines, state->selected,
|
menu_set_arrow_text ( state->filtered_lines, state->selected,
|
||||||
state->max_elements, state->arrowbox_top,
|
state->max_elements, state->arrowbox_top,
|
||||||
state->arrowbox_bottom );
|
state->arrowbox_bottom );
|
||||||
// Why do we need the specian -1?
|
// Why do we need the special -1?
|
||||||
int line_height = textbox_get_height ( state->text );
|
int line_height = textbox_get_height ( state->text );
|
||||||
XDrawLine ( display, main_window, gc, ( config.padding ),
|
XDrawLine ( display, main_window, gc, ( config.padding ),
|
||||||
line_height + ( config.padding ) + ( LINE_MARGIN ) / 2,
|
line_height + ( config.padding ) + ( LINE_MARGIN ) / 2,
|
||||||
|
@ -1372,7 +1372,7 @@ static void run_switcher ( int do_fork, SwitcherMode mode )
|
||||||
// we fork because it's technically possible to have multiple window
|
// we fork because it's technically possible to have multiple window
|
||||||
// lists up at once on a zaphod multihead X setup.
|
// lists up at once on a zaphod multihead X setup.
|
||||||
// this also happens to isolate the Xft font stuff in a child process
|
// this also happens to isolate the Xft font stuff in a child process
|
||||||
// that gets cleaned up every time. that library shows some valgrind
|
// that gets cleaned up every time. That library shows some valgrind
|
||||||
// strangeness...
|
// strangeness...
|
||||||
if ( do_fork == TRUE ) {
|
if ( do_fork == TRUE ) {
|
||||||
if ( fork () ) {
|
if ( fork () ) {
|
||||||
|
@ -1610,7 +1610,7 @@ static inline void load_configuration_dynamic ( Display *display )
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle sighub request.
|
* Handle sighup request.
|
||||||
* Currently we just reload the configuration.
|
* Currently we just reload the configuration.
|
||||||
*/
|
*/
|
||||||
static void hup_action_handler ( int num )
|
static void hup_action_handler ( int num )
|
||||||
|
@ -1770,7 +1770,7 @@ int main ( int argc, char *argv[] )
|
||||||
x11_grab_key ( display, switchers[i].modmask, switchers[i].keysym );
|
x11_grab_key ( display, switchers[i].modmask, switchers[i].keysym );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Setup handler for sighub (reload config)
|
// Setup handler for sighup (reload config)
|
||||||
const struct sigaction hup_action = {
|
const struct sigaction hup_action = {
|
||||||
.sa_handler = hup_action_handler
|
.sa_handler = hup_action_handler
|
||||||
};
|
};
|
||||||
|
|
|
@ -182,7 +182,7 @@ void textbox_move ( textbox *tb, int x, int y )
|
||||||
XMoveResizeWindow ( display, tb->window, tb->x, tb->y, tb->w, tb->h );
|
XMoveResizeWindow ( display, tb->window, tb->x, tb->y, tb->w, tb->h );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// within the parent. handled auto width/height modes
|
// within the parent handled auto width/height modes
|
||||||
void textbox_moveresize ( textbox *tb, int x, int y, int w, int h )
|
void textbox_moveresize ( textbox *tb, int x, int y, int w, int h )
|
||||||
{
|
{
|
||||||
if ( tb->flags & TB_AUTOHEIGHT ) {
|
if ( tb->flags & TB_AUTOHEIGHT ) {
|
||||||
|
|
Loading…
Reference in New Issue