Ticket #2 (reopened defect)

Opened 4 months ago

Last modified 1 day ago

no windows focus

Reported by: warwolf Assigned to: somebody
Priority: minor Milestone:
Component: guake Version:
Keywords: Cc:

Description

When you open the guake terminal you don't have the focus of the terminal.

[Only detected in Ubuntu 8.04, no occurs in Ubuntu 7.10]

Change History

05/28/08 05:20:04 changed by GabrielFalcao

  • priority changed from major to blocker.
  • minutos changed.

it just make Guake a little bit without usability

06/03/08 04:39:12 changed by lincoln

  • component changed from component1 to guake.

06/03/08 06:32:38 changed by lincoln

  • status changed from new to closed.
  • resolution set to fixed.

I added a window.window.focus() to the show_hide() method, I'm note sure if it's enough, but it worked in our tests.

06/09/08 09:07:58 changed by warwolf

works for me too. Thanks for the great job ;)

06/14/08 03:16:32 changed by gm

  • status changed from closed to reopened.
  • resolution deleted.

Unfortunately, the bug is still present here with 0.2.2.

Pressing F1 (the key I assigned to Guake) pops the terminal under the current window and without focus (unwanted behaviour 1). I have to press F1 twice to have focus.

Even stranger behaviour, if I press F1 just once (Guake therefore appears in background) and then press anywhere in the screen, then Guake come to front, unfocused (unwanted behaviour 2).

In order to make it disappear, I have to focus on Guake with the mouse, and then unfocus by clicking outside. But then, if I focus by clicking on the terminal window, Guake understands I kept the mouse button down (while it is not the case) and starts to draw a selection zone (unwanted behaviour 3).

Bug was already there with 0.1alpha.

I have Ubuntu 8.04, compiz and its window manager, gtk-window-decorator.

(follow-up: ↓ 7 ) 06/19/08 01:05:16 changed by lincoln

I confirm the report, but only in compiz, I closed this ticket after testing only in metacity window manager.

Thanks.

ps.: Can anyone help me to test in other wm's, like openbox, fluxbox's wm, etc... ? Thanks =)

(in reply to: ↑ 6 ) 06/19/08 17:26:53 changed by IsakovAN

Replying to lincoln:

I confirm the report, but only in compiz, I closed this ticket after testing only in metacity window manager. ps.: Can anyone help me to test in other wm's, like openbox, fluxbox's wm, etc... ? Thanks =)

It seems, that "Focus stealing prevention" is incompatible with Guake and other "unexpectedly" appearing windows. This feature can be turned off but this is not good. May be discussion with compiz teem will help?

06/20/08 14:47:32 changed by lincoln

  • status changed from reopened to closed.
  • resolution set to fixed.

Hi, in the last guake commit (21a3eba7dae4dd47730755f38083a69157e8ec9e), I added the following code:

window.window.show()

That calls the gdk_window_show method on guake's gdk window. I think it's enough to grab the attention of all window managers, but again, only tests can ensure this =)

Again, I ask some one to help me to test it in more window managers. And feel free to reopen this ticket if you see this problem again.

IsakovAN:

Good point,

The change I'm commenting here, I made after reading a bit gdk source and its X backend and it uses XRaiseWindow and after I call gdk_window_focus that sends a _NET_ACTIVE_WINDOW hint to the window manager that supports it (compiz does support since 0.6).

I think it's enough, but I don't know if compiz catches anything in X and make a different thing.

In my tests it's working properly, but I have only one day testing it.

Thanks for contributting =)

08/26/08 12:22:19 changed by tacone

  • summary changed from no windows focus to Possible solution.

I don't know if the bug is resolved, since I didn't tried the last version, but I guess it could not. I had the same problem with one app I am developed.

This guy had the same problem: http://osdir.com/ml/gnome.gtk+.python/2004-12/msg00045.html A proposed solution: http://osdir.com/ml/gnome.gtk+.python/2004-12/msg00046.html

I found out that deskbar-applet uses a similar solution (that works for me)

[removed unnecessary code) class CuemiacWindowView?(gtk.Window):

def receive_focus(self, time):

self.entry.grab_focus() self.realize() self.window.set_user_time(time) self.present() self.move( self._model.get_window_x(), self._model.get_window_y() )

In my implementation i substituted time variable (since i had no timestamp available) with:

import time # put this at the beginning of the file def show(self):

self.window.focus() self.window.set_focus( self.text )""" self.text.grab_focus() self.window.realize() self.window.window.set_user_time(int(time.time())+1) self.window.present() self.window.hide() self.window.show()

This works for me with compiz.

08/26/08 12:22:50 changed by tacone

  • summary changed from Possible solution to no windows focus.

08/26/08 12:31:19 changed by pingou

  • status changed from closed to reopened.
  • resolution deleted.

08/27/08 04:38:54 changed by GabrielFalcao

  • priority changed from blocker to minor.