dmedvinsky / gsimplecal

Simple and lightweight GTK calendar (BSD license)
http://dmedvinsky.github.io/gsimplecal
Other
197 stars 19 forks source link

(mainwindow_position = mouse) not working #24

Closed notfoss closed 9 years ago

notfoss commented 9 years ago

Hi,

I have mainwindow_position = mouse in .config/gsimplecal/config, but still gsimplecal spawns at the centre of the screen.

Edit: Sorry, forgot to mention that gsimplecal is launched after clicking on the date portion of i3bar (populated using conky).

Here's a screenshot:

gsimplecal

It is supposed to launch at the top right corner of the screen as I click on the date, but it opens in the centre instead.

My configuration:

dmedvinsky commented 9 years ago

This is most likely due to how i3 is configured, I reckon. Can you maybe check your config or share it somewhere?

Also, if you run gsimplecal via terminal, does it spit any errors out?

notfoss commented 9 years ago

If I run it from the terminal, the following error is shown:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

One interesting thing I noted when launching from the terminal is that, if the mouse cursor is inside the top 20% (approximately) portion of the screen, gsimplecal spawns at the middle of the screen. In other cases it works fine.

I couldn't find anything interesting in my i3 and conky config files, but here they are for your reference:

i3 config: https://gist.github.com/anonymous/3a991f660efc4c4e8243#file-i3-config

conky_wrapper (i3bar status command): https://gist.github.com/anonymous/3a991f660efc4c4e8243#file-conky_wrapper

conky config: https://gist.github.com/anonymous/3a991f660efc4c4e8243#file-conky_i3

Background

It's worth mentioning that earlier (last year) I was using i3's inbuilt move command instead and it was working fine. Then I switched over to some other setup in the meanwhile. Now that I am back to using i3, the move command stopped working. So, I decided to try gsimplecal's own config file to do the job.

dmedvinsky commented 9 years ago

Installed i3 and was able to reproduce the problem with it. But I didn't get that error message in terminal (so it's probably unrelated) and I have no idea how to fix it. :disappointed:

This is i3wm's behaviour that when the floating window requests an offscreen position, it is positioned in the center, not near the requested edge. And gtk_window_set_position seems to not respect the window gravity and positions relative to the center of the window, so changing gravity won't help.

Needs more investigation of i3 config options, but maybe later.

notfoss commented 9 years ago

Well, at least earlier i3's own move command was working, but now even that isn't working, even though there hasn't been any new release since the last time I used it.

Anyway, thanks a lot for taking the trouble to reproduce the problem. Take your time for fixing it, I am in no hurry :)

notfoss commented 9 years ago

Update: i3 was updated recently and this problem seems to have been fixed! Both clicking on the i3bar and even launching from the terminal, gsimplecal is spawned near the mouse.

Also, no error is being shown now on launching from the terminal.

dmedvinsky commented 9 years ago

Perfect, the issue has resolved itself. :smirk_cat: Thanks for the heads up, @notfoss.