summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-11-21 15:48:09 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-23 13:04:13 +0900
commit5f6673f623b26822e5e8008e69df41b4b10596cd (patch)
treea29d86f07ce7cdf235b40ea4846b27c6796df066 /data
parentc31a70a4f58f1fd796ea32c23204b9ae7ee8b6b2 (diff)
win: Implement unresizable mode (fixed size windows)
This sends a signal to the CSD frame to hide the bottom bar and disable the resize borders.
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/elm/border.edc46
1 files changed, 31 insertions, 15 deletions
diff --git a/data/elementary/themes/edc/elm/border.edc b/data/elementary/themes/edc/elm/border.edc
index ccf0dd2..481dc93 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -480,10 +480,20 @@ group { name: "elm/border/base/default";
480 color: 0 0 0 0; 480 color: 0 0 0 0;
481 } 481 }
482 } 482 }
483 rect { "elm.event.resize.tl"; 483 rect { "top_resize_clip";
484 clip: "top_clip"; 484 clip: "top_clip";
485 desc { "default"; 485 desc { "default";
486 rel.to: "top_clip"; 486 rel.to: "top_clip";
487 }
488 desc { "hidden";
489 inherit: "default";
490 hid;
491 }
492 }
493 rect { "elm.event.resize.tl";
494 clip: "top_resize_clip";
495 desc { "default";
496 rel.to: "top_clip";
487 rel2.relative: 0.0 0.0; 497 rel2.relative: 0.0 0.0;
488 min: 32 4; 498 min: 32 4;
489 align: 0.0 0.0; 499 align: 0.0 0.0;
@@ -493,7 +503,7 @@ group { name: "elm/border/base/default";
493 desc { "hidden"; inherit: "default"; hid; } 503 desc { "hidden"; inherit: "default"; hid; }
494 } 504 }
495 rect { "elm.event.resize.t"; 505 rect { "elm.event.resize.t";
496 clip: "top_clip"; 506 clip: "top_resize_clip";
497 desc { "default"; 507 desc { "default";
498 rel1.relative: 1.0 0.0; 508 rel1.relative: 1.0 0.0;
499 rel1.to_y: "top_clip"; 509 rel1.to_y: "top_clip";
@@ -509,7 +519,7 @@ group { name: "elm/border/base/default";
509 desc { "hidden"; inherit: "default"; hid; } 519 desc { "hidden"; inherit: "default"; hid; }
510 } 520 }
511 rect { "elm.event.resize.tr"; 521 rect { "elm.event.resize.tr";
512 clip: "top_clip"; 522 clip: "top_resize_clip";
513 desc { "default"; 523 desc { "default";
514 rel.to: "top_clip"; 524 rel.to: "top_clip";
515 rel1.relative: 1.0 0.0; 525 rel1.relative: 1.0 0.0;
@@ -613,8 +623,9 @@ group { name: "elm/border/base/default";
613 } 623 }
614 } 624 }
615 625
616#define BORDERLESS 1 626#define BORDERLESS 1
617#define MAXIMIZED 2 627#define MAXIMIZED 2
628#define UNRESIZABLE 4
618#define SET_MODE(a) script { new m = get_int(border_mode); m |= (a); set_int(border_mode, m); eval_mode(m); } 629#define SET_MODE(a) script { new m = get_int(border_mode); m |= (a); set_int(border_mode, m); eval_mode(m); }
619#define UNSET_MODE(a) script { new m = get_int(border_mode); m &= ~(a); set_int(border_mode, m); eval_mode(m); } 630#define UNSET_MODE(a) script { new m = get_int(border_mode); m &= ~(a); set_int(border_mode, m); eval_mode(m); }
620 631
@@ -622,10 +633,12 @@ group { name: "elm/border/base/default";
622 script { 633 script {
623 public border_mode; 634 public border_mode;
624 public eval_mode(m) { 635 public eval_mode(m) {
625 if (m & (BORDERLESS | MAXIMIZED)) { 636 if (m & (BORDERLESS | MAXIMIZED | UNRESIZABLE)) {
626 set_state(PART:"bottom_clip", "hidden", 0.0); 637 set_state(PART:"bottom_clip", "hidden", 0.0);
638 set_state(PART:"top_resize_clip", "hidden", 0.0);
627 } else { 639 } else {
628 set_state(PART:"bottom_clip", "default", 0.0); 640 set_state(PART:"bottom_clip", "default", 0.0);
641 set_state(PART:"top_resize_clip", "default", 0.0);
629 } 642 }
630 } 643 }
631 } 644 }
@@ -644,6 +657,14 @@ group { name: "elm/border/base/default";
644 } 657 }
645 program { "borderless,off"; UNSET_MODE(BORDERLESS); } 658 program { "borderless,off"; UNSET_MODE(BORDERLESS); }
646 program { 659 program {
660 signal: "elm,state,unresizable,on"; source: "elm";
661 SET_MODE(UNRESIZABLE);
662 }
663 program {
664 signal: "elm,state,unresizable,off"; source: "elm";
665 UNSET_MODE(UNRESIZABLE);
666 }
667 program {
647 signal: "elm,state,shadow,on"; source: "elm"; 668 signal: "elm,state,shadow,on"; source: "elm";
648 action: STATE_SET "default"; 669 action: STATE_SET "default";
649 targets: "shadow_spacer" "shadow"; 670 targets: "shadow_spacer" "shadow";
@@ -748,11 +769,8 @@ group { name: "elm/border/base/default";
748 } 769 }
749 program { 770 program {
750 signal: "elm,state,maximize*"; source: "elm"; 771 signal: "elm,state,maximize*"; source: "elm";
751 action: STATE_SET "hidden"; 772 SET_MODE(MAXIMIZED);
752 targets: "elm.event.resize.t" "elm.event.resize.tl" "elm.event.resize.tr" "bottom_clip";
753 after: "maximized,on";
754 } 773 }
755 program { "maximized,on"; SET_MODE(MAXIMIZED); }
756 program { 774 program {
757 signal: "elm,state,unmaximize*"; source: "elm"; 775 signal: "elm,state,unmaximize*"; source: "elm";
758 action: STATE_SET "default"; 776 action: STATE_SET "default";
@@ -760,11 +778,8 @@ group { name: "elm/border/base/default";
760 } 778 }
761 program { 779 program {
762 signal: "elm,state,unmaximize*"; source: "elm"; 780 signal: "elm,state,unmaximize*"; source: "elm";
763 action: STATE_SET "default"; 781 UNSET_MODE(MAXIMIZED);
764 targets: "elm.event.resize.t" "elm.event.resize.tl" "elm.event.resize.tr" "bottom_clip";
765 after: "maximized,off";
766 } 782 }
767 program { "maximized,off"; UNSET_MODE(MAXIMIZED); }
768 783
769 /* application desktop menu */ 784 /* application desktop menu */
770 program { name: "show_menu"; 785 program { name: "show_menu";
@@ -843,7 +858,7 @@ group { name: "elm/border/base/default";
843 signal: "mouse,out"; source: "elm.event.resize.t"; 858 signal: "mouse,out"; source: "elm.event.resize.t";
844 action: SIGNAL_EMIT "elm,action,resize,hide" "elm.event.resize.t"; 859 action: SIGNAL_EMIT "elm,action,resize,hide" "elm.event.resize.t";
845 } 860 }
846 program { name: "resize_t_down"; 861 program {
847 signal: "mouse,down,1"; source: "elm.event.resize.t"; 862 signal: "mouse,down,1"; source: "elm.event.resize.t";
848 action: SIGNAL_EMIT "elm,action,resize,start" "elm.event.resize.t"; 863 action: SIGNAL_EMIT "elm,action,resize,start" "elm.event.resize.t";
849 } 864 }
@@ -914,6 +929,7 @@ group { name: "elm/border/base/default";
914 } 929 }
915} 930}
916 931
932#undef UNRESIZABLE
917#undef BORDERLESS 933#undef BORDERLESS
918#undef MAXIMIZED 934#undef MAXIMIZED
919#undef SET_MODE 935#undef SET_MODE