GithubHelp home page GithubHelp logo

Minimize to tray/start minimized about yakyak HOT 7 CLOSED

yakyak avatar yakyak commented on June 18, 2024
Minimize to tray/start minimized

from yakyak.

Comments (7)

algesten avatar algesten commented on June 18, 2024

None of the more active devs have currently windows as their main platform. This project could really do with someone helping out on that side.

from yakyak.

georgeto avatar georgeto commented on June 18, 2024

I've tried to implement it by myself, but it didn't work out as expected. The problem is hiding the window from taskbar. I've done it through calling mainWindow.hide() on minimize event, but immediately after the window is hidden, it pops up again, but without content.

main.coffee

...
Tray      = require 'tray'
...
tray = null
...
app.on 'ready', ->
    ...
    mainWindow.on 'minimize', ->
        tray = new Tray path.join __dirname, 'icons', 'icon.png'
        mainWindow.hide()

blackyakyak

from yakyak.

maxkueng avatar maxkueng commented on June 18, 2024

Linux has trays too (sometimes) and as far as I know (but I'm not sure) the OS X Dock basically acts as a tray because on OS X apps typically don't really exit when you close the window. But I may be talking nonsense.

Yes, would be nice if more Windows people came to help out.

from yakyak.

maxkueng avatar maxkueng commented on June 18, 2024

@georgeto: I'm not sure if the minimize event is the right place to hide the window. I think the regular minimize (to taskbar) and minimize to tray should be treated as different things.

Typically, apps that support tray icons do it as follows:

  • The minimize button in the window title bar minimizes the window to the taskbar just like any other window.
  • Clicking the tray icon toggles window visibility and when hidden it also disappears from the task bar. When shown it also reappears in the task bar.
  • There is an setting/option whether to just minimize to tray when closing the window (through "×" button in the window title bar), or whether to actually exit the app. It's often labeled as "Keep running in the system tray when closed". Minimize to tray is usually the default.
  • Right-clicking the tray icon usually opens a context menu that offers additional functionality including showing the window if it's hidden, hiding it if it's visible, and actually exiting the app.

from yakyak.

georgeto avatar georgeto commented on June 18, 2024

@maxkueng: It was just a quick test, that I have done to play around with the tray object. The behavior you described is exactly what I requested and its a shame, that I did not described it in such detail. Thank you.

from yakyak.

maxkueng avatar maxkueng commented on June 18, 2024

Cool, I'm excited to see the result! If you need someone to try it out on Linux let me know. I do have a tray :)

from yakyak.

abhigenie92 avatar abhigenie92 commented on June 18, 2024

Did this work?

from yakyak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.