saikyun / freja

Self-modifiable editor for coding graphical things
68 stars 3 forks source link

Initial position of application window #31

Open sogaiu opened 3 years ago

sogaiu commented 3 years ago

In my multi-display setup, freja's main window shows up across two displays. I think it is a little awkward.

I wonder if it's practical to get the window to show up on the display that currently has the pointer on it.

I suppose someone might have figured out how to use more than one pointing device but may be that's not worth worrying about at this point :)

saikyun commented 3 years ago

Oh, that's interesting. I haven't had that happen to me. What OS and WM are you on?

I plan on making it so that window position and size is stored between sessions, so hopefully that will resolve the issue for you. :)

Den tis 31 aug. 2021 06:49sogaiu @.***> skrev:

In my multi-display setup, freja's main window shows up across two displays. I think it is a little awkward.

I wonder if it's practical to get the window to show up on the display that currently has the pointer on it.

I suppose someone might have figured out how to use more than one pointing device but may be that's not worth worrying about at this point :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/saikyun/freja/issues/31, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS46Z6MPKBHQHQOK7Z627DT7RNM5ANCNFSM5DDIDQ6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

sogaiu commented 3 years ago

I noticed it with Manjaro using XFCE. This is with Xorg.

sogaiu commented 3 years ago

Regarding restoring the window position from a previous time -- that sounds nice. It is possibly a bit tricky when the display situation has changed. For example, suppose you quit when you had two displays but the next time you used freja you only have one...

saikyun commented 3 years ago

As a hotfix you can put calls like this into your init.janet :)

(use freja-jaylib)

(def nof (get-monitor-count))
(def preferred-monitor 1)
(set-window-monitor (min nof preferred-monitor))
(set-window-position 0 0)
sogaiu commented 3 years ago

I tried this, but I get strange behavior:

1) The window doesn't have the typical window manager related stuff (like the title bar). 2) When I focus a different display freja disappears from view and the window under it appears.

To get freja back I "unminimize".

saikyun commented 3 years ago

Oh, hmm. I need to try myself with two screens

Den fre 3 sep. 2021 14:35sogaiu @.***> skrev:

I tried this, but I get strange behavior:

  1. The window doesn't have the typical window manager related stuff (like the title bar).
  2. When I focus a different display freja disappears from view and the window under it appears.

To get freja back I "unminimize".

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/saikyun/freja/issues/31#issuecomment-912504456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS46ZY35GK4I7L6CUGQF2DUAC6JDANCNFSM5DDIDQ6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.