Re: launching xkill



2014/1/4 Megh Parikh <meghjp gmail com>:
 the following code deoes not run (it shows hello but the x arrow does not
come)

gedit using the same code works. why??

button.connect('button-press-event',  Lang.bind(this, function () {
    if (GLib.spawn_command_line_sync('xkill')) _showHello();
        }));

If you spawn something synchronously from gnome-shell, you block the
rendering loop of the compositor, which freezes the screen, until
xkill returns.
In general, the rule is, never do anything that might block (including
disk IO, commands, network), always do stuff async.

Giovanni


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]