Ticket #2 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

no windows focus

Reported by: warwolf Owned by: 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

  Changed 5 years ago by GabrielFalcao

  • priority changed from major to blocker

it just make Guake a little bit without usability

  Changed 5 years ago by lincoln

  • component changed from component1 to guake

  Changed 5 years ago 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.

  Changed 5 years ago by warwolf

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

  Changed 5 years ago by gm

  • status changed from closed to reopened
  • resolution fixed 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   Changed 5 years ago 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   Changed 5 years ago 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?

  Changed 5 years ago 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 =)

  Changed 5 years ago 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.

  Changed 5 years ago by tacone

  • summary changed from Possible solution to no windows focus

  Changed 5 years ago by pingou

  • status changed from closed to reopened
  • resolution fixed deleted

  Changed 5 years ago by GabrielFalcao

  • priority changed from blocker to minor

  Changed 4 years ago by lincoln

hey, someone can still reproduce this bug? I can not, so should we close this bug?

  Changed 4 years ago by pingou

Let's close it.

Please if that bug can be reproduced again reopen it ! :-)

Thanks for the report

  Changed 4 years ago by pingou

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.