1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 05:48:01 +01:00
Commit Graph

78 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
97189ce2cc Enable usermenu
This patch enables the usermenu when the application is launched
and the usermenu file exists.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2015-08-25 15:42:06 +01:00
BALATON Zoltan
cb3702559a wmaker: Restore multi screen functionality by reverting wrong commits
Revert patches that moved variables from WMScreen to global level
because this broke X displays with multiple independent screens and
caused dock and clip icons to become mixed up. When managing multiple
screens each screen used to have it's own state/dock and clip. This
commit restores that by reverting mainly the commits listed below (and
those that are invalidated by reverting these) and fixing up later
commits to apply after the revert.

Reverted commits:
f60e65001b Moved 'workspace_name_font' from the Screen to a Workspace object in the global namespace
9e103a46e9 Variable workspace_count moved to the workspace object in the global namespace
e5ae684d02 Variable last_workspace moved to workspace object in global namespace
c610b8d7ce Variable current_workspace moved to workspace object in global namespace
f0c5073600 Array of workspaces moved to the workspace object in the global namespace
9c252988f8 Variable workspace_menu moved to workspace object in global namespace
e86b8dcb2f Clip, Dock and Drawers menu moved to appropriate global namespace
074092f319 Removed WScreen args not used
4a7daf2322 AppIcon list moved out of WScreen
2103fe390b Variable clip_icon moved to clip object in the global namespace
014bc52531 wClipIconPaint appicon argument removed
40e1ea08b8 Varible session_state moved to global namespace
6987d4aa40 Removed WScreen argument
0de3e590ce shortcutWindows moved to w_global
2e64831fb6 Removed unused variable wapp_list
b6423a7b4f wmaker: Moved variable Screen Count into the global namespace

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 13:04:14 +01:00
Christophe CURIS
e56438d2c1 wmaker: Removed unused argument in function 'wDockFinishLaunch'
The function did not use the argument 'dock', so remove it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-11-02 15:11:42 -02:00
Rodolfo García Peñas (kix)
2e64831fb6 Removed unused variable wapp_list
The variable wapp_list is never set, then the comparison with
wapp is only true if wapp is NULL. wapp can not be NULL in the
function wApplicationDestroy() because is tested previously.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:45 +01:00
Christophe CURIS
ec91b9f68e wmaker: Moved definition of X Contexts into the global variables structure 2013-09-30 00:53:10 +02:00
Rodolfo García Peñas (kix)
5455a585dc funcs.h removed
The file funcs.h is removed. A new file osdep.h is created to hold
the definition for all osdep_*c files.

The files .c has been adjusted to include the right header files,
removing funcs.h, including osdep.h.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-05-26 19:48:00 +01:00
Rodolfo García Peñas (kix)
70c9208e40 Simplify the application appicon creation
This patch removes all the appicon stuff from the application creation
to the appicon creation. Now, the application only calls one function
(create_appicon_for_application()) and this function do all the work.

The function do the same code than the code before this patch, but the
only change is that the "if" test to check if the appicon was found in
the docks now is negated, removing the return and doing the appicon_save
inside the function.

Finally, the old makeAppIconFor is now create_appicon_for_application().
2013-01-22 21:46:39 +00:00
BALATON Zoltan
c7e3666e62 Made highlighting the AppIcon of the active app configurable at run time 2012-11-17 20:32:10 +01:00
Rodolfo García Peñas (kix)
cc1503a2f0 wAppIconPaint argument removed
This patch removes the wAppIconPaint() Bool flag, because now it is
always False.
2012-11-11 11:59:41 +00:00
Rodolfo García Peñas (kix)
33ebded4f9 wAppIconPaint paint argument
The function wAppIconPaint has a new argument. This argument is used
to force an icon create if needed.
2012-11-11 11:57:58 +00:00
Rodolfo García Peñas (kix)
f5d845cfad Remove unused argument from wDefaultFillAttributes()
The function wDefaultFillAttributes() doesn't use the argument WScreen,
so it can be removed.
2012-07-04 20:45:56 +02:00
Carlos R. Mafra
a1e80f5411 Unify save_appicon() and wAppIconSave()
Having two similarly named functions for doing the same thing is confusing.
In order to account for the extra check done by the late wAppIconSave(),
add an argument "dock".

Now there's only save_appicon().

And as pointed out by Rodolfo kix García, the save_appicon_core() function
can be removed too.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2012-06-21 20:34:22 +01:00
Carlos R. Mafra
4700e5f0b2 Make create_appicon_from_dock() do only what its name implies
Function names are important and should not do more than their
names imply. In this case, create_appicon_from_dock() should only
try to get an icon from the dock (or clip).

If the icon is not there, do not try to make an icon from scratch.
You were told to create it from the dock!

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2012-06-21 20:32:31 +01:00
Rodolfo García Peñas (kix)
96800cdc16 app_icon_create_from_docks renamed to create_appicon_from_dock
The function app_icon_create_from_docks is renamed to create_appicon_from_dock
because the name reads better.
2012-06-19 00:12:40 +01:00
Rodolfo García Peñas (kix)
089c99941f Icon painting moved to makeAppIconFor()
The icon painting is moved to the function makeAppIconFor()
including the check for no_appicon.

wAppIconCreate is now static because is only used in makeAppIconFor()
2012-06-18 23:25:34 +01:00
Rodolfo García Peñas (kix)
e3b9026532 save_app_icon WWindow argument removed
The argument wwin (WWindow) is not used in save_app_icon, so it can
be removed.
2012-06-18 23:15:28 +01:00
Rodolfo García Peñas (kix)
1fbce07805 extractIcon removed.
The function extractIcon is removed, and its behaviour is moved to
save_app_icon, because this function is always called.

To do that, save_app_icon doesn't need to check if the icon is saved (it's
done at wIconStore). The icon now is saved always (if it doesn't exist),
like extractIcon() used to do.
2012-06-18 23:14:10 +01:00
Rodolfo García Peñas (kix)
bc0700e016 Create WAppIcon always
When the application is created, the WAppIcon now is created always,
but it is only painted if the flag is not set.

The icon initialization to NULL can be done now at app_icon_create_from_docks
because it is always called.
2012-06-18 22:58:55 +01:00
Rodolfo García Peñas (kix)
a08adcd283 app_icon_create_from_docks moved to appicon.c
The function app_icon_create_from_docks is moved to appicon.c, because
it is a function to create application icons.

The static function findDockIconFor is moved too because it is only used
at app_icon_create_from_docks().
2012-06-18 22:52:49 +01:00
Rodolfo García Peñas (kix)
f44944c18d Icon functions moved to appicon.c
The icon functions wApplicationExtractDirPackIcon() wApplicationSaveIconPathFor()
are moved to appicon.c from application.c.

This functions are Application Icon related and should be included in appicon.
2012-06-18 22:25:57 +01:00
Rodolfo García Peñas (kix)
7f022f1c8f Remove code duplication by calling get_name_for_instance_class()
The code in application.c to create the icon name is
included in icon.c (function get_name_for_instance_class).
2012-06-12 00:15:33 +01:00
Rodolfo García Peñas (kix)
e8074ae1cd Remove code duplication by calling removeAppIconFor()
The function removeAppIconFor() does exactly the same thing as the code inside
wApplicationDestroy(), including the last call to wArrangeIcons(). So let's
simply remove the code and call the function instead.
2012-06-02 20:05:14 +01:00
Rodolfo García Peñas (kix)
fbab31b798 Coding style cleanup in application.c
Changes to application.c:

- Curly brackets
- Code commented
- Include not used
2012-06-01 22:01:02 +01:00
Rodolfo García Peñas (kix)
dd6a54bba5 Check one time if no_appicon is set
This patch checks if the no_appicon flag is set, then, the icon
is not created, therefore cannot be painted neither saved.

Some comments added to clarify the code.
2012-06-01 22:01:02 +01:00
Rodolfo García Peñas (kix)
bd3fb21441 Remove code duplication by calling paint_app_icon()
The code in application.c to create+paint the application icon is
included in appicon.c (function paint_app_icon).
2012-06-01 22:01:02 +01:00
Rodolfo García Peñas (kix)
01ea1fa8b4 New function app_icon_create_from_docks
The new function app_icon_create_from_docks do all the needed stuff to create
the application app_icon using a previous image in docks.

The contents of the app_icon_create_from_docks were moved from the
wApplicationCreate function. Now this function is more clear.
2012-06-01 22:01:02 +01:00
Rodolfo García Peñas (kix)
1c1697dc40 New function save_app_icon
New function to save the icon "save_app_icon". This function is
created in appicon.c, because is related to app_icons. The contents
are from application.c. No important modifications are included in
this function. Removed the includes not needed.
2012-06-01 22:01:02 +01:00
Rodolfo García Peñas (kix)
423b78811a Initialize app_icon to null
The app_icon initialization to null is common in the if and else blocks.
2012-06-01 22:01:02 +01:00
Tobias Stoeckmann
cc30444dda No need to call memset after wmalloc
memset is the last function call in wmalloc, just before it returns the
newly allocated memory.  Therefore it is not needed to call it again
after wmalloc call.  Although I would prefer to switch wmalloc to a
calloc-based wcalloc function, the compatibility of WINGs for old apps
should be kept.
2012-05-04 18:41:01 -03:00
Rodolfo García Peñas (kix)
219315aa58 WindowMaker: Check iconPath variable only if needed
The variable iconPath should only checked inside the if block,
because outside is never initialized.
2012-04-15 23:15:47 -03:00
Rodolfo García Peñas (kix)
761fd37e51 WindowMaker: Clean curly brackets
This patch removes the unneeded curly brackets in multiple files.

It also add some comments in the code. In usermenu.c removes some
variables not used.
2012-04-15 23:15:20 -03:00
Rodolfo García Peñas (kix)
391a8edb9c Turn wApplication{Activate,Deactivate} into real functions
The functions wApplicationActivate and wApplicationDeactivate are now defined
as functions, not as preprocessor functions.
2012-04-05 12:26:25 +01:00
Rodolfo García Peñas (kix)
aab9028fc2 Coding-style cleanup
Code style cleanup in multiple files. Tabs, spaces, curly brackets,...
2012-03-30 19:50:10 +01:00
Tamas TEVESZ
f65b99e615 Remove warnings
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
2011-03-24 16:19:52 +01:00
Brad Jorsch
76eab97209 Don't save app settings proplist when nothing changed
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-12 23:34:28 +02:00
Brad Jorsch
a396f3bd66 Only cache pixmaps for docked icons
There is little point caching a pixmap for an app that isn't in the
dock. This patch creates a function wAppIconSave that saves only if the
app icon is docked, and adds calls to that function in all the places
where an appicon can transition from undocked to docked.

It also "adds" a function wApplicationSaveIconPathFor that saves an icon
path to the configuration plist; the function already existed, it was
just static before.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:03:31 +02:00
Brad Jorsch
ee1f13da45 Fix wIconUpdate logic
This patch changes the logic for choosing the icon, and gets rid of
wIconChangeImage in favor of wIconChangeImageFile.

Old logic:
* On create, load either NET_WM_ICON or the file from disk.
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. WM_HINTS icon_pixmap
  3. Whatever was loaded on creation, unless wIconChangeImage or
	 wIconChangeImageFile was called.
  4. Default icon.

New logic:
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. NET_WM_ICON
  3. WM_HINTS icon_pixmap
  4. Icon file from disk.
  5. Default icon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:00:24 +02:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
e7f3e62d69 Fix typo in wApplicationExtractDirPackIcon()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Brad Jorsch
8f63bdafcd Periodic bouncing for XUrgencyHint
When a window has XUrgencyHint set, bounce the app icon periodically.
2010-09-17 11:05:51 +02:00
Alexey I. Froloff
8e0ef4766d Drop BOUNCE_APP #ifdef's
Since bouncing respects DisableAnimations option, there's no need
in #ifdef's.

Acked-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-17 10:18:35 +02:00
Alexey I. Froloff
392ab2607d Highlite current window's appicon
This patch highlites appicon of a currently focused window.

Original-patch-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:56:40 +02:00
Alexey I. Froloff
a257e16593 Bouncing appicon effect
When starting application (or opening transient dialog) bounce
its appicon.

Original-patch-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:53:32 +02:00
Carlos R. Mafra
5178465bb6 Remove DEBUG statements, #if 0 etc
...and some other cleanups.
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
15e37ff942 Remove #ifdef NETWM_HINTS constructs
NETWM_HINT is always defined in src/wconfig.h.in, so
let's remove it from there too.
2009-10-12 01:00:19 +02:00
Carlos R. Mafra
2765bec3e4 Remove sound support
Two reasons for removing it:

    1) I won't ever want to hear useless sounds

    2) The sound support is a bit of a joke. The code is there but you have
       to hunt it somewhere else (not in any repository that I know of).
       In my 10 years of using wmaker, I never used it for this reason.
       Now I consider having no sound in Window Maker a feature, and I like
       it that way. So there is no point in carrying useless code around.

PS: There is still the code in WPrefs to be removed.
2009-10-09 20:04:47 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
kojima
25c37b7637 applied patch to rename .AppInfo directory 2005-03-11 01:58:55 +00:00
dan
9ead135f51 - Replaced Apps with Applications in WPrefs installation path
- Added missing switchpanel.h to compile file list
2004-10-23 03:53:25 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00