Closed fabianfiorotto closed 1 year ago
There are only two states for a sticky note: pop-up or fold,Switch the status by clicking the buttonbianqian,Double click to create a blank note
@zhuyaliang where is that state stored?
This is the workflow of the code
if (event->type == GDK_2BUTTON_PRESS) {
popup_add_note (applet, NULL);
return TRUE;
}
else if (event->button == 1) {
stickynote_toggle_notes_visible ();
return TRUE;
}
stickynote_toggle_notes_visible (void)
{
stickynote_show_notes (!stickynotes->visible);
}
stickynote_show_notes (gboolean visible)
{
stickynote_set_visible (note, visible);
}
stickynote_set_visible (StickyNote *note,
gboolean visible)
{
if (visible) {
gtk_window_present (GTK_WINDOW (note->w_window));
} else {
gtk_window_iconify (GTK_WINDOW (note->w_window));
}
}
When the new application overwrites the Stickynotes, the Stickynotes will be minimized when you click the Stickynotes. Click Stickynotes again, and the Stickynotes will appear on all applicatio
According to what I see in the code the function stickynote_show_notes
is called only in 4 places.
I don't know much about how this is coded but it doesn't look like there is an event listener or something like that that is fired when a new window is opened.
An easy solution for this is adding an option in the config to make the icon always show the notes instead of toggling them. I never use the icon to hide the notes I don't know if someone does.
Adding a custom gsettings
is a good idea. Everyone's operating habits are different.I will complete this function when I have plenty of time
This is a bug that has annoyed me for years (Since Gnome2). I've tried to find something about it but I couldn't.
Expected behaviour
When the icon in the status bar is clicked and the sticky notes aren't in the front they should pup up to the front.
Actual behaviour
It seems like the sticky notes have an internal state that tells them if they are in front or in the back instead of checking the state in the window system. So when I click on the icon nothing happens and if I click once again a new blank stick note is created.
Steps to reproduce the behavior
MATE general version
MATE 1.26.0
Linux Distribution
Linux Mint 20.3 Una de 64 bits
I don't spect that this bug is fixed soon I just want to open a place to discuss it and find a possible solution to work on it.