spheras / desktopfolder

Bring your Desktop Back to Life
GNU General Public License v3.0
201 stars 40 forks source link

Basic desktop background window (for right click and drag) #47

Closed aljelly closed 6 years ago

aljelly commented 6 years ago

This is separate to (or precursor to) #22, this is about adding a basic desktop background window that can receive right clicking and dragging.

It would mean that you could create new objects by right clicking or dragging boxes on the desktop rather than right clicking on existing objects.

Perhaps making the desktop window the parent of all the other windows (Panels/Photos/Notes) and/or trying the modal option could solve the problem of the desktop window getting in front of the other windows?

spheras commented 6 years ago

my concern is about other installed docks/desktop widgets... The idea is good, but what happen if the user have another app, like conky (I don't remember if you can interact with conky widgets)... So, I'm not sure if we will disable the interaction with that kind of apps if we put an invisible window. This need to be investigated because I think it could be a solution for wayland problems, at least for absolute coordinates, but not sure because I need to investigate more on wayland.

At the begining of the project I tried to create a wingpanel icon to create from there widgets (panel, photos, and so on), but I don't know if only for that is justified.

spheras commented 6 years ago

@aljelly, i've created a branch for this. Please, take a look to the first aproximation I did.. It looks fine, but as I said, I'm afraid about the possibility to hide other dock apps (conky for instance?).

aljelly commented 6 years ago

That's cool! It seems to work well. Yes, Conky probably does need testing.

I made a tiny addition in the desktop-background-nopanel-file branch. It checks for a .nopanel file. If the folder isn't yet a panel then it skips the folder. If it is a panel, it destroys itself (and also skips if it's a general sync).

(It's mostly for the Desktop folder if it's going to be used as the general desktop (instead of the fake desktop folder). This would be if you wanted a folder to show as an item on the desktop rather than a panel for some reason. You just create a .nopanel file in the folder and it would appear as an icon instead.)

spheras commented 6 years ago

Sorry, I'm not sure to understand the need of .nopanel file.... if the Application get a .nopanel inside a folder, It isn't created as a panel... but, why is this needed? The fake desktop panel is "~/Desktop/desktopfolder" directory... I mean, all the files and folders of this panel (transparent background desktop panel) are inside this directory (~/Desktop/desktopfolder). It is a normal panel (the only difference is that it is an special panel which is the transparent background panel).

I think this could make sense if the fake panel were "~/Desktop" directly, but is not the case (I avoided that because in that case should have checks to allow files and folders inside the application folder (~/Desktop), like the .nopanel black list..., each time the monitor detect a change on the desktop folder, the application will start again checking changes to recreate panels, notes, photos and so on). Maybe you mean that it should be the ~/Desktop directory instead ~/Desktop/destopfolder?

aljelly commented 6 years ago

Yes, the .nopanel addition was with ~/Desktop folder in mind, if we eventually use it as the background folder (maybe I didn't word that so well). It wouldn't be needed if ~/Desktop/desktopfolder is kept as the background folder.

spheras commented 6 years ago

I decided to use a different folder to avoid problems between the application and the panel behaviour... but, yes, that was my first intention and should be the natural way (the problem is that you need extra caution when syncing).

Ok, I will merge your changes over mine to start using the main folder.

spheras commented 6 years ago

Done and merged with master. Please, take a look and tell me your opinion. Ah, it is needed a setting on the schema: desktop-panel=true (you can install it doing a sudo ninja install)

If the schema is not found, the desktop is not created.. this can be a solution for people who doesn't want a desktop interaction for some reason or problem with other docks applications.